diff --git a/Dockerfile b/Dockerfile index 0edba6a..9a0335c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -72,9 +72,9 @@ RUN set -e; \ apk --no-cache add bash; \ SH_CMD="$(which sh 2>/dev/null)"; \ BASH_CMD="$(which bash 2>/dev/null)"; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true; \ - [ -x "$BASH_CMD" ] && [ "$SH_CMD" != "/bin/sh" ] && { rm -Rf "$SH_CMD";ln -s "$BASH_CMD" "$SH_CMD"; } || true; \ - [ -x "$BASH_CMD" ] && [ ! -L "/bin/sh" ] && { rm -rf "/bin/sh" || true; } && ln -sf "$BASH_CMD" "/bin/sh" || true + [ -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 ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] diff --git a/Dockerfile.3.14 b/Dockerfile.3.14 index 80083d5..429772a 100644 --- a/Dockerfile.3.14 +++ b/Dockerfile.3.14 @@ -72,9 +72,9 @@ RUN set -e; \ apk --no-cache add bash; \ SH_CMD="$(which sh 2>/dev/null)"; \ BASH_CMD="$(which bash 2>/dev/null)"; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true; \ - [ -x "$BASH_CMD" ] && [ "$SH_CMD" != "/bin/sh" ] && { rm -Rf "$SH_CMD";ln -s "$BASH_CMD" "$SH_CMD"; } || true; \ - [ -x "$BASH_CMD" ] && [ ! -L "/bin/sh" ] && { rm -rf "/bin/sh" || true; } && ln -sf "$BASH_CMD" "/bin/sh" || true + [ -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 ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] diff --git a/Dockerfile.3.15 b/Dockerfile.3.15 index f1eb281..42a679d 100644 --- a/Dockerfile.3.15 +++ b/Dockerfile.3.15 @@ -72,9 +72,9 @@ RUN set -e; \ apk --no-cache add bash; \ SH_CMD="$(which sh 2>/dev/null)"; \ BASH_CMD="$(which bash 2>/dev/null)"; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true; \ - [ -x "$BASH_CMD" ] && [ "$SH_CMD" != "/bin/sh" ] && { rm -Rf "$SH_CMD";ln -s "$BASH_CMD" "$SH_CMD"; } || true; \ - [ -x "$BASH_CMD" ] && [ ! -L "/bin/sh" ] && { rm -rf "/bin/sh" || true; } && ln -sf "$BASH_CMD" "/bin/sh" || true + [ -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 ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] diff --git a/Dockerfile.3.16 b/Dockerfile.3.16 index ee6b6fe..b7b0525 100644 --- a/Dockerfile.3.16 +++ b/Dockerfile.3.16 @@ -72,9 +72,9 @@ RUN set -e; \ apk --no-cache add bash; \ SH_CMD="$(which sh 2>/dev/null)"; \ BASH_CMD="$(which bash 2>/dev/null)"; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true; \ - [ -x "$BASH_CMD" ] && [ "$SH_CMD" != "/bin/sh" ] && { rm -Rf "$SH_CMD";ln -s "$BASH_CMD" "$SH_CMD"; } || true; \ - [ -x "$BASH_CMD" ] && [ ! -L "/bin/sh" ] && { rm -rf "/bin/sh" || true; } && ln -sf "$BASH_CMD" "/bin/sh" || true + [ -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 ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] diff --git a/Dockerfile.3.17 b/Dockerfile.3.17 index 7719328..3cd16a8 100644 --- a/Dockerfile.3.17 +++ b/Dockerfile.3.17 @@ -72,9 +72,9 @@ RUN set -e; \ apk --no-cache add bash; \ SH_CMD="$(which sh 2>/dev/null)"; \ BASH_CMD="$(which bash 2>/dev/null)"; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true; \ - [ -x "$BASH_CMD" ] && [ "$SH_CMD" != "/bin/sh" ] && { rm -Rf "$SH_CMD";ln -s "$BASH_CMD" "$SH_CMD"; } || true; \ - [ -x "$BASH_CMD" ] && [ ! -L "/bin/sh" ] && { rm -rf "/bin/sh" || true; } && ln -sf "$BASH_CMD" "/bin/sh" || true + [ -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 ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] diff --git a/Dockerfile.3.18 b/Dockerfile.3.18 index 9c70edf..948123e 100644 --- a/Dockerfile.3.18 +++ b/Dockerfile.3.18 @@ -72,9 +72,9 @@ RUN set -e; \ apk --no-cache add bash; \ SH_CMD="$(which sh 2>/dev/null)"; \ BASH_CMD="$(which bash 2>/dev/null)"; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true; \ - [ -x "$BASH_CMD" ] && [ "$SH_CMD" != "/bin/sh" ] && { rm -Rf "$SH_CMD";ln -s "$BASH_CMD" "$SH_CMD"; } || true; \ - [ -x "$BASH_CMD" ] && [ ! -L "/bin/sh" ] && { rm -rf "/bin/sh" || true; } && ln -sf "$BASH_CMD" "/bin/sh" || true + [ -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 ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] diff --git a/Dockerfile.3.19 b/Dockerfile.3.19 index a2011ef..8b8cd44 100644 --- a/Dockerfile.3.19 +++ b/Dockerfile.3.19 @@ -72,9 +72,9 @@ RUN set -e; \ apk --no-cache add bash; \ SH_CMD="$(which sh 2>/dev/null)"; \ BASH_CMD="$(which bash 2>/dev/null)"; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true; \ - [ -x "$BASH_CMD" ] && [ "$SH_CMD" != "/bin/sh" ] && { rm -Rf "$SH_CMD";ln -s "$BASH_CMD" "$SH_CMD"; } || true; \ - [ -x "$BASH_CMD" ] && [ ! -L "/bin/sh" ] && { rm -rf "/bin/sh" || true; } && ln -sf "$BASH_CMD" "/bin/sh" || true + [ -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 ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] diff --git a/Dockerfile.3.20 b/Dockerfile.3.20 index 43ca4c1..ca8c464 100644 --- a/Dockerfile.3.20 +++ b/Dockerfile.3.20 @@ -72,9 +72,9 @@ RUN set -e; \ apk --no-cache add bash; \ SH_CMD="$(which sh 2>/dev/null)"; \ BASH_CMD="$(which bash 2>/dev/null)"; \ - [ -n "$BASH_CMD" ] && sed -i 's|root:x:.*|root:x:0:0:root:/root:'$BASH_CMD'|g' "/etc/passwd" || true; \ - [ -x "$BASH_CMD" ] && [ "$SH_CMD" != "/bin/sh" ] && { rm -Rf "$SH_CMD";ln -s "$BASH_CMD" "$SH_CMD"; } || true; \ - [ -x "$BASH_CMD" ] && [ ! -L "/bin/sh" ] && { rm -rf "/bin/sh" || true; } && ln -sf "$BASH_CMD" "/bin/sh" || true + [ -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 ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ] diff --git a/Dockerfile.edge b/Dockerfile.edge index d0bb685..807eabd 100644 --- a/Dockerfile.edge +++ b/Dockerfile.edge @@ -69,7 +69,11 @@ WORKDIR /root RUN set -e; \ echo "Setting up prerequisites"; \ - apk --no-cache add bash + 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 + ENV SHELL="/bin/bash" SHELL [ "/bin/bash", "-c" ]