diff --git a/Dockerfile b/Dockerfile index 427313c..cee91db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,13 +31,12 @@ RUN mv dist assets/webpage FROM ${base} -# The final image uses user `wkd` for added security WORKDIR /wkd +COPY entrypoint.sh entrypoint.sh +COPY --from=webpage-builder assets assets +COPY --from=bin-builder simple-wkd-executable wkd RUN apk add --no-cache libgcc && \ adduser --no-create-home --disabled-password wkd && \ chown -R wkd:wkd /wkd -USER wkd -COPY --from=webpage-builder assets assets -COPY --from=bin-builder simple-wkd-executable wkd -ENTRYPOINT [ "/wkd/wkd" ] \ No newline at end of file +ENTRYPOINT [ "sh", "/wkd/entrypoint.sh" ] \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..a402048 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/bash +chown -R wkd:wkd /wkd +su wkd -c /wkd/wkd \ No newline at end of file