diff --git a/Dockerfile b/Dockerfile index b650de6..dc81d8c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -67,19 +67,21 @@ ENV HOSTNAME="casjaysdevdocker-alpine" USER ${USER} WORKDIR /root +COPY ./rootfs/usr/local/bin/. /usr/local/bin/ + RUN set -e; \ echo "Setting up prerequisites"; \ apk --no-cache add bash; \ SH_CMD="$(which sh 2>/dev/null)"; \ BASH_CMD="$(which bash 2>/dev/null)"; \ - [ -x "$BASH_CMD" ] && { rm -Rf "$SH_CMD"|| true ;ln -s "$BASH_CMD" "$SH_CMD"; } || true; \ - [ -x "$BASH_CMD" ] && { rm -rf "/bin/sh" || true; } && ln -sf "$BASH_CMD" "/bin/sh" || true; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true + [ -x "\$BASH_CMD" ] && symlink "\$BASH_CMD" "/bin/sh" || true; \ + [ -x "\$BASH_CMD" ] && symlink "\$BASH_CMD" "/usr/bin/sh" || true; \ + [ -x "\$BASH_CMD" ] && [ "\$SH_CMD" != "/bin/sh"] && symlink "\$BASH_CMD" "\$SH_CMD" || true; \ + [ -n "\$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'\$BASH_CMD'|g' "/etc/passwd" || true ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] -COPY ./rootfs/usr/local/bin/. /usr/local/bin/ COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu RUN echo "Initializing the system"; \ diff --git a/Dockerfile.3.14 b/Dockerfile.3.14 index e95dcdd..b142d19 100644 --- a/Dockerfile.3.14 +++ b/Dockerfile.3.14 @@ -67,19 +67,21 @@ ENV HOSTNAME="casjaysdevdocker-alpine" USER ${USER} WORKDIR /root +COPY ./rootfs/usr/local/bin/. /usr/local/bin/ + RUN set -e; \ echo "Setting up prerequisites"; \ apk --no-cache add bash; \ SH_CMD="$(which sh 2>/dev/null)"; \ BASH_CMD="$(which bash 2>/dev/null)"; \ - [ -x "$BASH_CMD" ] && { rm -Rf "$SH_CMD"|| true ;ln -s "$BASH_CMD" "$SH_CMD"; } || true; \ - [ -x "$BASH_CMD" ] && { rm -rf "/bin/sh" || true; } && ln -sf "$BASH_CMD" "/bin/sh" || true; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true + [ -x "\$BASH_CMD" ] && symlink "\$BASH_CMD" "/bin/sh" || true; \ + [ -x "\$BASH_CMD" ] && symlink "\$BASH_CMD" "/usr/bin/sh" || true; \ + [ -x "\$BASH_CMD" ] && [ "\$SH_CMD" != "/bin/sh"] && symlink "\$BASH_CMD" "\$SH_CMD" || true; \ + [ -n "\$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'\$BASH_CMD'|g' "/etc/passwd" || true ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] -COPY ./rootfs/usr/local/bin/. /usr/local/bin/ COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu RUN echo "Initializing the system"; \ diff --git a/Dockerfile.3.15 b/Dockerfile.3.15 index 6e624dd..1e8f1ff 100644 --- a/Dockerfile.3.15 +++ b/Dockerfile.3.15 @@ -67,19 +67,21 @@ ENV HOSTNAME="casjaysdevdocker-alpine" USER ${USER} WORKDIR /root +COPY ./rootfs/usr/local/bin/. /usr/local/bin/ + RUN set -e; \ echo "Setting up prerequisites"; \ apk --no-cache add bash; \ SH_CMD="$(which sh 2>/dev/null)"; \ BASH_CMD="$(which bash 2>/dev/null)"; \ - [ -x "$BASH_CMD" ] && { rm -Rf "$SH_CMD"|| true ;ln -s "$BASH_CMD" "$SH_CMD"; } || true; \ - [ -x "$BASH_CMD" ] && { rm -rf "/bin/sh" || true; } && ln -sf "$BASH_CMD" "/bin/sh" || true; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true + [ -x "\$BASH_CMD" ] && symlink "\$BASH_CMD" "/bin/sh" || true; \ + [ -x "\$BASH_CMD" ] && symlink "\$BASH_CMD" "/usr/bin/sh" || true; \ + [ -x "\$BASH_CMD" ] && [ "\$SH_CMD" != "/bin/sh"] && symlink "\$BASH_CMD" "\$SH_CMD" || true; \ + [ -n "\$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'\$BASH_CMD'|g' "/etc/passwd" || true ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] -COPY ./rootfs/usr/local/bin/. /usr/local/bin/ COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu RUN echo "Initializing the system"; \ diff --git a/Dockerfile.3.16 b/Dockerfile.3.16 index a2e464e..cf4c264 100644 --- a/Dockerfile.3.16 +++ b/Dockerfile.3.16 @@ -67,19 +67,21 @@ ENV HOSTNAME="casjaysdevdocker-alpine" USER ${USER} WORKDIR /root +COPY ./rootfs/usr/local/bin/. /usr/local/bin/ + RUN set -e; \ echo "Setting up prerequisites"; \ apk --no-cache add bash; \ SH_CMD="$(which sh 2>/dev/null)"; \ BASH_CMD="$(which bash 2>/dev/null)"; \ - [ -x "$BASH_CMD" ] && { rm -Rf "$SH_CMD"|| true ;ln -s "$BASH_CMD" "$SH_CMD"; } || true; \ - [ -x "$BASH_CMD" ] && { rm -rf "/bin/sh" || true; } && ln -sf "$BASH_CMD" "/bin/sh" || true; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true + [ -x "\$BASH_CMD" ] && symlink "\$BASH_CMD" "/bin/sh" || true; \ + [ -x "\$BASH_CMD" ] && symlink "\$BASH_CMD" "/usr/bin/sh" || true; \ + [ -x "\$BASH_CMD" ] && [ "\$SH_CMD" != "/bin/sh"] && symlink "\$BASH_CMD" "\$SH_CMD" || true; \ + [ -n "\$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'\$BASH_CMD'|g' "/etc/passwd" || true ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] -COPY ./rootfs/usr/local/bin/. /usr/local/bin/ COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu RUN echo "Initializing the system"; \ diff --git a/Dockerfile.3.17 b/Dockerfile.3.17 index d41829a..0f89ca4 100644 --- a/Dockerfile.3.17 +++ b/Dockerfile.3.17 @@ -67,19 +67,21 @@ ENV HOSTNAME="casjaysdevdocker-alpine" USER ${USER} WORKDIR /root +COPY ./rootfs/usr/local/bin/. /usr/local/bin/ + RUN set -e; \ echo "Setting up prerequisites"; \ apk --no-cache add bash; \ SH_CMD="$(which sh 2>/dev/null)"; \ BASH_CMD="$(which bash 2>/dev/null)"; \ - [ -x "$BASH_CMD" ] && { rm -Rf "$SH_CMD"|| true ;ln -s "$BASH_CMD" "$SH_CMD"; } || true; \ - [ -x "$BASH_CMD" ] && { rm -rf "/bin/sh" || true; } && ln -sf "$BASH_CMD" "/bin/sh" || true; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true + [ -x "\$BASH_CMD" ] && symlink "\$BASH_CMD" "/bin/sh" || true; \ + [ -x "\$BASH_CMD" ] && symlink "\$BASH_CMD" "/usr/bin/sh" || true; \ + [ -x "\$BASH_CMD" ] && [ "\$SH_CMD" != "/bin/sh"] && symlink "\$BASH_CMD" "\$SH_CMD" || true; \ + [ -n "\$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'\$BASH_CMD'|g' "/etc/passwd" || true ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] -COPY ./rootfs/usr/local/bin/. /usr/local/bin/ COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu RUN echo "Initializing the system"; \ diff --git a/Dockerfile.3.18 b/Dockerfile.3.18 index 906f7bd..b7c2992 100644 --- a/Dockerfile.3.18 +++ b/Dockerfile.3.18 @@ -67,19 +67,21 @@ ENV HOSTNAME="casjaysdevdocker-alpine" USER ${USER} WORKDIR /root +COPY ./rootfs/usr/local/bin/. /usr/local/bin/ + RUN set -e; \ echo "Setting up prerequisites"; \ apk --no-cache add bash; \ SH_CMD="$(which sh 2>/dev/null)"; \ BASH_CMD="$(which bash 2>/dev/null)"; \ - [ -x "$BASH_CMD" ] && { rm -Rf "$SH_CMD"|| true ;ln -s "$BASH_CMD" "$SH_CMD"; } || true; \ - [ -x "$BASH_CMD" ] && { rm -rf "/bin/sh" || true; } && ln -sf "$BASH_CMD" "/bin/sh" || true; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true + [ -x "\$BASH_CMD" ] && symlink "\$BASH_CMD" "/bin/sh" || true; \ + [ -x "\$BASH_CMD" ] && symlink "\$BASH_CMD" "/usr/bin/sh" || true; \ + [ -x "\$BASH_CMD" ] && [ "\$SH_CMD" != "/bin/sh"] && symlink "\$BASH_CMD" "\$SH_CMD" || true; \ + [ -n "\$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'\$BASH_CMD'|g' "/etc/passwd" || true ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] -COPY ./rootfs/usr/local/bin/. /usr/local/bin/ COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu RUN echo "Initializing the system"; \ diff --git a/Dockerfile.3.19 b/Dockerfile.3.19 index 6423c91..ef5d990 100644 --- a/Dockerfile.3.19 +++ b/Dockerfile.3.19 @@ -67,19 +67,21 @@ ENV HOSTNAME="casjaysdevdocker-alpine" USER ${USER} WORKDIR /root +COPY ./rootfs/usr/local/bin/. /usr/local/bin/ + RUN set -e; \ echo "Setting up prerequisites"; \ apk --no-cache add bash; \ SH_CMD="$(which sh 2>/dev/null)"; \ BASH_CMD="$(which bash 2>/dev/null)"; \ - [ -x "$BASH_CMD" ] && { rm -Rf "$SH_CMD"|| true ;ln -s "$BASH_CMD" "$SH_CMD"; } || true; \ - [ -x "$BASH_CMD" ] && { rm -rf "/bin/sh" || true; } && ln -sf "$BASH_CMD" "/bin/sh" || true; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true + [ -x "\$BASH_CMD" ] && symlink "\$BASH_CMD" "/bin/sh" || true; \ + [ -x "\$BASH_CMD" ] && symlink "\$BASH_CMD" "/usr/bin/sh" || true; \ + [ -x "\$BASH_CMD" ] && [ "\$SH_CMD" != "/bin/sh"] && symlink "\$BASH_CMD" "\$SH_CMD" || true; \ + [ -n "\$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'\$BASH_CMD'|g' "/etc/passwd" || true ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] -COPY ./rootfs/usr/local/bin/. /usr/local/bin/ COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu RUN echo "Initializing the system"; \ diff --git a/Dockerfile.3.20 b/Dockerfile.3.20 index 528c8be..38b8448 100644 --- a/Dockerfile.3.20 +++ b/Dockerfile.3.20 @@ -67,19 +67,21 @@ ENV HOSTNAME="casjaysdevdocker-alpine" USER ${USER} WORKDIR /root +COPY ./rootfs/usr/local/bin/. /usr/local/bin/ + RUN set -e; \ echo "Setting up prerequisites"; \ apk --no-cache add bash; \ SH_CMD="$(which sh 2>/dev/null)"; \ BASH_CMD="$(which bash 2>/dev/null)"; \ - [ -x "$BASH_CMD" ] && { rm -Rf "$SH_CMD"|| true ;ln -s "$BASH_CMD" "$SH_CMD"; } || true; \ - [ -x "$BASH_CMD" ] && { rm -rf "/bin/sh" || true; } && ln -sf "$BASH_CMD" "/bin/sh" || true; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true + [ -x "\$BASH_CMD" ] && symlink "\$BASH_CMD" "/bin/sh" || true; \ + [ -x "\$BASH_CMD" ] && symlink "\$BASH_CMD" "/usr/bin/sh" || true; \ + [ -x "\$BASH_CMD" ] && [ "\$SH_CMD" != "/bin/sh"] && symlink "\$BASH_CMD" "\$SH_CMD" || true; \ + [ -n "\$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'\$BASH_CMD'|g' "/etc/passwd" || true ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] -COPY ./rootfs/usr/local/bin/. /usr/local/bin/ COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu RUN echo "Initializing the system"; \ diff --git a/Dockerfile.edge b/Dockerfile.edge index c6b6502..d9e27d5 100644 --- a/Dockerfile.edge +++ b/Dockerfile.edge @@ -67,18 +67,20 @@ ENV HOSTNAME="casjaysdevdocker-alpine" USER ${USER} WORKDIR /root +COPY ./rootfs/usr/local/bin/. /usr/local/bin/ + RUN set -e; \ echo "Setting up prerequisites"; \ apk --no-cache add bash; \ - [ -x "$BASH_CMD" ] && { rm -Rf "$SH_CMD"|| true ;ln -s "$BASH_CMD" "$SH_CMD"; } || true; \ - [ -x "$BASH_CMD" ] && { rm -rf "/bin/sh" || true; } && ln -sf "$BASH_CMD" "/bin/sh" || true; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true + [ -x "\$BASH_CMD" ] && symlink "\$BASH_CMD" "/bin/sh" || true; \ + [ -x "\$BASH_CMD" ] && symlink "\$BASH_CMD" "/usr/bin/sh" || true; \ + [ -x "\$BASH_CMD" ] && [ "\$SH_CMD" != "/bin/sh"] && symlink "\$BASH_CMD" "\$SH_CMD" || true; \ + [ -n "\$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'\$BASH_CMD'|g' "/etc/passwd" || true ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] -COPY ./rootfs/usr/local/bin/. /usr/local/bin/ COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu RUN echo "Initializing the system"; \