geonode-project
geonode-project copied to clipboard
Docker build fails, when being connected to a VPN
When I'm connected to the VPN of my company, docker-compose up --build fails with following errors:
Get:4 http://deb.debian.org/debian stretch/main amd64 xxd amd64 2:8.0.0197-4+deb9u1 [132 kB]
Err:4 http://deb.debian.org/debian stretch/main amd64 xxd amd64 2:8.0.0197-4+deb9u1
Hash Sum mismatch
Hashes of expected file:
- SHA256:6cf151f1921bf1e347aa7bef73745844caa40f2d54a33c4b1be1448bb98ca744
- MD5Sum:f6c519ed7826f32b610279d0f5af799b [weak]
- Filesize:131540 [weak]
Hashes of received file:
- SHA256:a6873de8c875e4f9ce390cd1c2e877e83388a2fabc0a3a22bf9978f86f6bde23
- MD5Sum:916b0eb03c79f96d6af434c81cf169ba [weak]
- Filesize:155466 [weak]
Last modification reported: Wed, 24 May 2017 15:55:43 +0000
Get:5 http://deb.debian.org/debian stretch/main amd64 vim-common all 2:8.0.0197-4+deb9u1 [159 kB]
Searching the internet I found following fix for that. Creating the file 99fixbadproxy and add the three lines to it.
RUN echo "Acquire::http::Pipeline-Depth 0;" > /etc/apt/apt.conf.d/99fixbadproxy
RUN echo "Acquire::http::No-Cache true;" >> /etc/apt/apt.conf.d/99fixbadproxy
RUN echo "Acquire::BrokenProxy true;" >> /etc/apt/apt.conf.d/99fixbadproxy
I couldn't find any explanation of these lines, so I'm sure if this is good practice.
If somebody can confirm, that this is nothing to worry about, I would create I pull request.
Thanks.
Your company is keeping a copy of the packages; those commands are used to avoid using the cache. Use that commands for the moment as workaround.