Comments (7)
Actually, I still believe, this is an issue of either docker, docker-compose or mattermost docker file. I have encountered exactly the same and IMHO, editting the provided files with my company proxy settings is just a workaround but not a proper fix. The docker-compose (or whatever) should take those proxy settings from the system / docker proxy settings.
from mattermost-docker.
The fact I need to keep my environment variables input in two seperate places is quite riddiculous. .env
content should be present in the sstem right from the beginning of image building.
from mattermost-docker.
@Niceplace if you are deploying mattermost, you can use auto built images: https://hub.docker.com/r/mattermost/mattermost-prod-app/, https://hub.docker.com/r/mattermost/mattermost-prod-db/, https://hub.docker.com/r/mattermost/mattermost-prod-web/ so that you can get around with your firewall.
Also if you want to build the image but get 404, it might not be your file cause it seems that apt-get reached the remote server, but server returned 404. You could try sometime later. There might be a problem with apt repo mirror at the time you were building your image. (I got those errors sometime as well).
from mattermost-docker.
Hi @xcompass thanks for replying !
Thank you for suggesting the official images from dockerhub, I didn't explore this solution !
However, I do like the flexibility to have the Dockerfiles of each individual component as this repo provides so I will share my solution.
Regarding this :
There might be a problem with apt repo mirror at the time you were building your image. (I got those errors sometime as well).
I thought that as well but the second I configured my proxy the errors went away. I tested multiple times to make sure.
Here's my final configuration that works (for building, that is. I have other problems with SSL but that's out of scope here.)
Interesting note : variables in docker-compose MUST NOT contain dashes "-", they aren't evaluated if its the case. I haven't found documentation for this yet ( I didn't search a lot ).
Interesting note 2 : These variables are used in the build context only. At least that's what I understand from the docker-compose documentation.
docker-compose.yml
- replace my.proxy.address with actual proxy adress
- replace 1234 with actual proxy port
- sproxy stands for https_proxy, I got lazy. I know there is an http address there as well, its because our company doesn't have an https proxy.
version: "2"
services:
db:
build:
context: ./db
args:
proxy: "http://my.proxy.address:1234"
sproxy: "http://my.proxy.address:1234"
noproxy: "localhost,127.0.0.1,$LOCAL_DOMAIN"
restart: always
volumes:
- /app/docker-volumes/mattermost/postgresql/data:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
environment:
- MM_USERNAME=mmuser
- MM_PASSWORD=mmuser_password
- MM_DBNAME=mattermost
app:
build:
context: ./app
args:
proxy: "http://my.proxy.address:1234"
sproxy: "http://my.proxy.address:1234"
noproxy: "localhost,127.0.0.1,$LOCAL_DOMAIN"
links:
- db:db
restart: always
volumes:
- /app/docker-volumes/mattermost/mattermost/config:/mattermost/config:rw
- /app/docker-volumes/mattermost/mattermost/data:/mattermost/data:rw
- /etc/localtime:/etc/localtime:ro
web:
build:
context: ./web
args:
proxy: "http://my.proxy.address:1234"
sproxy: "http://my.proxy.address:1234"
noproxy: "localhost,127.0.0.1,$LOCAL_DOMAIN"
ports:
- "11443:443"
links:
- app:app
restart: always
volumes:
# This directory must have cert files
- /app/docker-volumes/mattermost/mattermost/cert:/cert:ro
- /etc/localtime:/etc/localtime:ro
environment:
- MATTERMOST_ENABLE_SSL=true
- PLATFORM_PORT_80_TCP_PORT=80
Dockerfile (this is the one for web, but the same method was used for app and db)
Notice the ARG to "import" arguments from Dockerfile, and double quotes after this with ENV to interpret the value as a string (I think ?).
FROM ubuntu:14.04
ARG proxy
ARG sproxy
ARG noproxy
ENV http_proxy="$proxy"
ENV https_proxy="$sproxy"
ENV no_proxy="$noproxy"
RUN apt-get update && apt-get install -y nginx
RUN rm /etc/nginx/sites-enabled/default
COPY mattermost /etc/nginx/sites-available/
COPY mattermost-ssl /etc/nginx/sites-available/
ADD docker-entry.sh /
RUN chmod +x /docker-entry.sh
# You can see the logs using `docker-compose logs web`.
RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stderr /var/log/nginx/error.log
# Define working directory.
WORKDIR /etc/nginx
ENTRYPOINT /docker-entry.sh
EXPOSE 80 443
from mattermost-docker.
Closing issue because I found a solution.
from mattermost-docker.
Thanks @Niceplace for the update and solution.
from mattermost-docker.
I cannot connect and restore nuget packages behind proxy.
from mattermost-docker.
Related Issues (20)
- {PATCH} is included in the version view and not correct version number HOT 5
- Untrusted certificate from Andriod mobile app HOT 1
- release-5.33 Uses Wrong Version of Postgres HOT 3
- updating to 5.33 release with mysql HOT 1
- How to update to the latest ESR version (or to a specific version)? HOT 1
- docker_app unhealthy connection timeout to psql HOT 4
- Mattermost mobile app server warning message after upgrade HOT 2
- Sync Releases to mattermost-server HOT 11
- Why Mattermost releases 5.34, 5.34.1, 5.34.2, 5.35, 5.35.2 missing in mattermost-docker releases? HOT 2
- Proxy authentication required (gitlab sso token issue
- SiteURL must be set .. HOT 1
- the switch to postgres10 doesn't handle DB upgrades HOT 2
- Upgrading to 5.36.1 HOT 3
- Building DB Failes HOT 4
- Deployment failures in a variety of configurations, including locally built and docker hub images HOT 2
- Error when building gevent for db containers HOT 3
- Error: unknown shorthand flag: 'u' in -upgrade_db_30
- No new releases? HOT 1
- Some updates on the Mattermost-docker repository HOT 3
- Error: failed to load configuration: failed to create store HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mattermost-docker.