-
Notifications
You must be signed in to change notification settings - Fork 578
Add support for corporate proxy environment #74
Comments
@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). |
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 :
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
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 ?).
|
Closing issue because I found a solution. |
Thanks @Niceplace for the update and solution. |
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. |
I cannot connect and restore nuget packages behind proxy. |
The fact I need to keep my environment variables input in two seperate places is quite riddiculous. |
Hi all,
I'm trying to run the docker-compose installation and I ran into a small problem,
I was getting 404 errors on the "apt-get update && apt-get install" and I figured it was because of our beloved proxy again.
Adding ENV variables to the Dockerfiles fixed it :
ENV http_proxy <HTTP_PROXY>
ENV https_proxy <HTTPS_PROXY>
Where HTTP_PROXY and HTTPS_PROXY are replaced by the url of the proxy in question.
Any ideas how this could be implemented ? I can dig further and provide a PR if this is OK with you guys.
The text was updated successfully, but these errors were encountered: