mirror of
https://github.com/vyos/vyos-build.git
synced 2025-10-01 20:28:40 +02:00
Docker build files for entrypoint and UIDs
This commit is contained in:
parent
ecc0db23c3
commit
4004496e89
1
Jenkinsfile
vendored
1
Jenkinsfile
vendored
@ -21,6 +21,7 @@ pipeline {
|
|||||||
dockerfile {
|
dockerfile {
|
||||||
filename 'Dockerfile'
|
filename 'Dockerfile'
|
||||||
label 'jessie-amd64'
|
label 'jessie-amd64'
|
||||||
|
dir 'docker'
|
||||||
args '--privileged --sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006'
|
args '--privileged --sysctl net.ipv6.conf.lo.disable_ipv6=0 -e GOSU_UID=1006 -e GOSU_GID=1006'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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 && \
|
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
|
chmod a+s /usr/sbin/useradd /usr/sbin/gosu /usr/sbin/usermod
|
||||||
|
|
||||||
COPY scripts/docker-entrypoint.sh /usr/local/bin/
|
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||||
@ -18,7 +18,6 @@ fi
|
|||||||
# Notify user about selected UID/GID
|
# Notify user about selected UID/GID
|
||||||
echo "Current UID/GID: $NEW_UID/$NEW_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
|
useradd --shell /bin/bash -u $NEW_UID -g $NEW_GID -o -m $USER_NAME
|
||||||
usermod -aG sudo $USER_NAME
|
usermod -aG sudo $USER_NAME
|
||||||
sudo chown $NEW_UID:$NEW_GID /home/$USER_NAME
|
sudo chown $NEW_UID:$NEW_GID /home/$USER_NAME
|
||||||
Loading…
x
Reference in New Issue
Block a user