diff --git a/Dockerfile b/Dockerfile index bb8412cc9..bcb62ed58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,7 +39,9 @@ ENV DISABLE_ADDITIONAL_FEATURES=true \ TMP=/tmp/stirling-pdf # JDK for app -RUN printf '%s\n' \ +RUN apk add --no-cache bash \ + && ln -sf /bin/bash /bin/sh \ + && printf '%s\n' \ 'https://dl-cdn.alpinelinux.org/alpine/edge/main' \ 'https://dl-cdn.alpinelinux.org/alpine/edge/community' \ 'https://dl-cdn.alpinelinux.org/alpine/edge/testing' \ @@ -98,7 +100,8 @@ RUN printf '%s\n' \ # User permissions addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \ chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline /tmp/stirling-pdf && \ - chown stirlingpdfuser:stirlingpdfgroup /app.jar + chown stirlingpdfuser:stirlingpdfgroup /app.jar && \ + ln -sf /bin/busybox /bin/sh EXPOSE 8080/tcp diff --git a/Dockerfile.fat b/Dockerfile.fat index 363c4b555..5609ffd20 100644 --- a/Dockerfile.fat +++ b/Dockerfile.fat @@ -53,7 +53,9 @@ ENV DISABLE_ADDITIONAL_FEATURES=true \ TMP=/tmp/stirling-pdf # JDK for app -RUN printf '%s\n' \ +RUN apk add --no-cache bash \ + && ln -sf /bin/bash /bin/sh \ + && printf '%s\n' \ 'https://dl-cdn.alpinelinux.org/alpine/edge/main' \ 'https://dl-cdn.alpinelinux.org/alpine/edge/community' \ 'https://dl-cdn.alpinelinux.org/alpine/edge/testing' \ @@ -111,7 +113,8 @@ RUN printf '%s\n' \ # User permissions addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \ chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline /tmp/stirling-pdf && \ - chown stirlingpdfuser:stirlingpdfgroup /app.jar + chown stirlingpdfuser:stirlingpdfgroup /app.jar && \ + ln -sf /bin/busybox /bin/sh EXPOSE 8080/tcp # Set user and run command diff --git a/Dockerfile.ultra-lite b/Dockerfile.ultra-lite index 3a7c67072..a49362d60 100644 --- a/Dockerfile.ultra-lite +++ b/Dockerfile.ultra-lite @@ -24,7 +24,9 @@ COPY scripts/installFonts.sh /scripts/installFonts.sh COPY app/core/build/libs/*.jar app.jar # Set up necessary directories and permissions -RUN printf '%s\n' \ +RUN apk add --no-cache bash \ + && ln -sf /bin/bash /bin/sh \ + && printf '%s\n' \ 'https://dl-cdn.alpinelinux.org/alpine/edge/main' \ 'https://dl-cdn.alpinelinux.org/alpine/edge/community' \ 'https://dl-cdn.alpinelinux.org/alpine/edge/testing' \ @@ -44,7 +46,8 @@ RUN printf '%s\n' \ chmod +x /scripts/*.sh && \ addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \ chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /pipeline /configs /customFiles /tmp/stirling-pdf && \ - chown stirlingpdfuser:stirlingpdfgroup /app.jar + chown stirlingpdfuser:stirlingpdfgroup /app.jar && \ + ln -sf /bin/busybox /bin/sh # Set environment variables ENV ENDPOINTS_GROUPS_TO_REMOVE=CLI