Changed the way http proxy configuration is injected.
This commit is contained in:
parent
5947080262
commit
6fa496588c
11
Dockerfile
11
Dockerfile
|
@ -1,9 +1,14 @@
|
|||
FROM alpine
|
||||
|
||||
ARG http_proxy
|
||||
ARG https_proxy
|
||||
ARG HTTP_PROXY_HOST
|
||||
ARG HTTP_PROXY_PORT
|
||||
ARG HTTPS_PROXY_HOST
|
||||
ARG HTTPS_PROXY_PORT
|
||||
|
||||
RUN apk add --no-cache openldap openldap-clients openldap-back-ldap openldap-overlay-deref ldapvi && mkdir -p /run/openldap
|
||||
RUN \
|
||||
if [ -n "$HTTP_PROXY_HOST" -a -n "$HTTP_PROXY_PORT" ]; then export http_proxy=http://$HTTP_PROXY_HOST:$HTTP_PROXY_PORT; fi && \
|
||||
if [ -n "$HTTPS_PROXY_HOST" -a -n "$HTTPS_PROXY_PORT" ]; then export https_proxy=http://$HTTPS_PROXY_HOST:$HTTPS_PROXY_PORT; fi && \
|
||||
apk add --no-cache openldap openldap-clients openldap-back-ldap openldap-overlay-deref ldapvi && mkdir -p /run/openldap
|
||||
|
||||
COPY root /
|
||||
|
||||
|
|
|
@ -5,8 +5,10 @@ services:
|
|||
build:
|
||||
context: .
|
||||
args:
|
||||
http_proxy: ${http_proxy}
|
||||
https_proxy: ${https_proxy}
|
||||
HTTP_PROXY_HOST: ${HTTP_PROXY_HOST}
|
||||
HTTP_PROXY_PORT: ${HTTP_PROXY_PORT}
|
||||
HTTPS_PROXY_HOST: ${HTTPS_PROXY_HOST}
|
||||
HTTPS_PROXY_PORT: ${HTTPS_PROXY_PORT}
|
||||
container_name: ldap.proxy
|
||||
networks:
|
||||
- ldap.proxy
|
||||
|
|
Loading…
Reference in a new issue