MISP / x_old_misp_docker

MISP Docker (XME edition)
283 stars 168 forks source link

https_proxy env vars should be preserved in SUDO_WWW / use apt-cacher-ng server for apt-update #129

Open marcas1 opened 3 years ago

marcas1 commented 3 years ago

I got

Cloning into '/var/www/MISP'... fatal: unable to access 'https://github.com/MISP/MISP.git/': Could not resolve host: github.com

I fixed that with , at least for Debian, in INSTALL_NODB.sh line 87 :

87:    SUDO_WWW="sudo **--preserve-env=HTTPS_PROXY,HTTP_PROXY** -H -u ${WWW_USER} "

(and I remove the exit 1 after sha1sum test to bypass)

in docker-compose, I added in section "environment:"

      - HTTP_PROXY=${HTTP_PROXY}
      - HTTPS_PROXY=${HTTPS_PROXY}

and I defined my proxy values in .env (template.env)

at the top of web/Dockerfile I inserted line 7 for adding my apt-cacher-ng server for .deb (different from http(s)_proxy ENV.)

RUN [ -f /etc/apt/apt.conf ] || echo 'Acquire::http::Proxy "http://apt-cache.mydomain:3142/";' |tee -a /etc/apt/apt.conf

(I first defined a ~/.docker/config.json with proxy env vars too but It was sometimes ignored)

regards