Rename abc user to buildkite
parent
9e7dac1107
commit
8939ca4f65
|
@ -54,9 +54,9 @@ RUN \
|
|||
tar xfz s6-overlay.tar.gz -C / && \
|
||||
echo "**** Patch CVE-2019-5021 ****" && \
|
||||
sed -i -e 's/^root::/root:!:/' /etc/shadow && \
|
||||
echo "**** Create abc user and make our folders ****" && \
|
||||
useradd -u 911 -U -d /buildkite -s /bin/false abc && \
|
||||
usermod -G wheel abc && \
|
||||
echo "**** Create buildkite user and make our folders ****" && \
|
||||
useradd -u 911 -U -d /buildkite -s /bin/false buildkite && \
|
||||
usermod -G wheel buildkite && \
|
||||
sed -i 's/# %wheel/%wheel/g' /etc/sudoers && \
|
||||
echo "**** Install Buildkite ****" && \
|
||||
mkdir -p /buildkite/builds /buildkite/hooks /buildkite/plugins && \
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
PUID=${PUID:-911}
|
||||
PGID=${PGID:-911}
|
||||
|
||||
groupmod -o -g "$PGID" abc
|
||||
usermod -o -u "$PUID" abc
|
||||
groupmod -o -g "$PGID" buildkite
|
||||
usermod -o -u "$PUID" buildkite
|
||||
|
||||
cat <<'EOF'
|
||||
--------------------------------------------
|
||||
|
@ -22,8 +22,8 @@ GID/UID
|
|||
--------------------------------------------
|
||||
EOF
|
||||
echo "
|
||||
User uid: $(id -u abc)
|
||||
User gid: $(id -g abc)
|
||||
User uid: $(id -u buildkite)
|
||||
User gid: $(id -g buildkite)
|
||||
--------------------------------------------
|
||||
"
|
||||
chown abc:abc /buildkite
|
||||
chown buildkite:buildkite /buildkite
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# permissions
|
||||
chown -R abc:abc \
|
||||
chown -R buildkite:buildkite \
|
||||
/buildkite
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
exec \
|
||||
s6-setuidgid abc ssh-env-config.sh /usr/local/bin/buildkite-agent start
|
||||
s6-setuidgid buildkite ssh-env-config.sh /usr/local/bin/buildkite-agent start
|
|
@ -4,5 +4,5 @@ while [ ! -S "/run/docker.sock" ];
|
|||
do
|
||||
sleep 1;
|
||||
done
|
||||
chown root:abc /run/docker.sock
|
||||
chown root:buildkite /run/docker.sock
|
||||
tail -f /dev/null
|
Loading…
Reference in New Issue