aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-03-04 18:07:49 +0100
committerGerd Hoffmann <kraxel@redhat.com>2020-03-04 18:07:49 +0100
commitc196eedabc73e7245b4baf05e7fdf35ac72879be (patch)
tree904888aa73f1c76f19498a2972042b5b3c29f008
parent37e1aa24fa024a5d642f143638435975a48dcf61 (diff)
downloads2i-jekyll-c196eedabc73e7245b4baf05e7fdf35ac72879be.tar.gz
proxy setup
-rw-r--r--Dockerfile.ubi84
-rw-r--r--etc/proxy.sh19
2 files changed, 22 insertions, 1 deletions
diff --git a/Dockerfile.ubi8 b/Dockerfile.ubi8
index 1bba7d0..ba74fc8 100644
--- a/Dockerfile.ubi8
+++ b/Dockerfile.ubi8
@@ -18,8 +18,10 @@ USER root
COPY ./s2i/bin/ /usr/libexec/s2i
COPY ./etc/jekyll-documentroot.conf /etc/httpd/conf.d/
+COPY ./etc/proxy.sh /etc/profile.d/
-RUN dnf upate -y;\
+RUN source /etc/profile.d/proxy.sh; \
+ dnf upate -y;\
dnf install -y httpd;\
gem install jekyll --version "= $JEKYLL_VERSION"
diff --git a/etc/proxy.sh b/etc/proxy.sh
new file mode 100644
index 0000000..0027af5
--- /dev/null
+++ b/etc/proxy.sh
@@ -0,0 +1,19 @@
+if test "$HTTP_PROXY" != ""; then
+ export http_proxy="$HTTP_PROXY"
+fi
+if test "$HTTPS_PROXY" != ""; then
+ export https_proxy="$HTTPS_PROXY"
+fi
+if test "$FTP_PROXY" != ""; then
+ export ftp_proxy="$FTP_PROXY"
+fi
+if test "$ALL_PROXY" != ""; then
+ export all_proxy="$ALL_PROXY"
+fi
+if test "$NO_PROXY" != ""; then
+ export no_proxy="$NO_PROXY"
+fi
+
+echo "-=- debug -=-"
+set | grep -i -e "_proxy="
+echo "-=-"