summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-01-11 09:15:33 +0100
committerChristian Poessinger <christian@poessinger.com>2019-01-11 09:15:33 +0100
commit4004496e89d2a27cfb4cc3a87253dd9dac54e160 (patch)
tree7b95e9de7f3757af07ae01eaf4436e5415069a82
parentecc0db23c34219d9b9c343d11a38ad3c8bf3e04c (diff)
downloadvyos-build-4004496e89d2a27cfb4cc3a87253dd9dac54e160.tar.gz
vyos-build-4004496e89d2a27cfb4cc3a87253dd9dac54e160.zip
Docker build files for entrypoint and UIDs
-rw-r--r--Jenkinsfile1
-rw-r--r--docker/Dockerfile (renamed from Dockerfile)4
-rwxr-xr-xdocker/entrypoint.sh (renamed from scripts/docker-entrypoint.sh)1
3 files changed, 3 insertions, 3 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index 3406e606..7a780286 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -21,6 +21,7 @@ pipeline {
dockerfile {
filename 'Dockerfile'
label 'jessie-amd64'
+ dir 'docker'
args '--privileged --sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006'
}
}
diff --git a/Dockerfile b/docker/Dockerfile
index a76dc8b7..2744d291 100644
--- a/Dockerfile
+++ b/docker/Dockerfile
@@ -160,5 +160,5 @@ RUN export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packe
RUN sed "s/^%sudo.*/%sudo\tALL=(ALL) NOPASSWD:ALL/g" -i /etc/sudoers && \
chmod a+s /usr/sbin/useradd /usr/sbin/gosu /usr/sbin/usermod
-COPY scripts/docker-entrypoint.sh /usr/local/bin/
-ENTRYPOINT ["docker-entrypoint.sh"]
+COPY entrypoint.sh /usr/local/bin/entrypoint.sh
+ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
diff --git a/scripts/docker-entrypoint.sh b/docker/entrypoint.sh
index 845cb2ff..00e1e139 100755
--- a/scripts/docker-entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -18,7 +18,6 @@ fi
# Notify user about selected UID/GID
echo "Current UID/GID: $NEW_UID/$NEW_GID"
-# Create user called "docker" with selected UID
useradd --shell /bin/bash -u $NEW_UID -g $NEW_GID -o -m $USER_NAME
usermod -aG sudo $USER_NAME
sudo chown $NEW_UID:$NEW_GID /home/$USER_NAME