summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-03-04 17:51:06 +0100
committerGerd Hoffmann <kraxel@redhat.com>2020-03-04 17:51:06 +0100
commita8889278f8182131b4a1da7e26da9bf0fe3a95fc (patch)
tree9cc13881e384b89c4fa9a475484568cbc6d6314b
parent6cf1c5c7eb6cb0337153f9c539bc24e83589a426 (diff)
downloads2i-base-httpd-a8889278f8182131b4a1da7e26da9bf0fe3a95fc.tar.gz
proxy setup
-rw-r--r--Dockerfile4
-rw-r--r--etc/proxy.sh19
2 files changed, 22 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index 0a0212b..d23b305 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,7 +14,9 @@ LABEL maintainer="Gerd Hoffmann <kraxel@redhat.com>" \
USER root
-RUN dnf update -y && \
+COPY ./etc/proxy.sh /etc/profile.d
+RUN source /etc/profile./proxy.sh; \
+ dnf update -y && \
dnf install -y httpd && \
dnf clean all -y
diff --git a/etc/proxy.sh b/etc/proxy.sh
new file mode 100644
index 0000000..91d8950
--- /dev/null
+++ b/etc/proxy.sh
@@ -0,0 +1,19 @@
+if test "$HTTP_PROXY" != ""; then
+ http_proxy="$HTTP_PROXY"
+fi
+if test "$HTTPS_PROXY" != ""; then
+ https_proxy="$HTTPS_PROXY"
+fi
+if test "$FTP_PROXY" != ""; then
+ ftp_proxy="$FTP_PROXY"
+fi
+if test "$ALL_PROXY" != ""; then
+ all_proxy="$ALL_PROXY"
+fi
+if test "$NO_PROXY" != ""; then
+ no_proxy="$NO_PROXY"
+fi
+
+echo "-=- debug -=-"
+set | grep -i -e "_proxy="
+echo "-=-"