0
0
Fork 0
mirror of https://git.verdigado.com/NB-Public/simple-wkd.git synced 2024-10-30 01:25:53 +01:00

Improve wkd user

This commit is contained in:
Delta1925 2023-05-20 21:27:48 +02:00
parent 8cf300d322
commit 44d9147bc7
No known key found for this signature in database
GPG key ID: 1C21ACE44193CB25
2 changed files with 7 additions and 5 deletions

View file

@ -31,13 +31,12 @@ RUN mv dist assets/webpage
FROM ${base} FROM ${base}
# The final image uses user `wkd` for added security
WORKDIR /wkd 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 && \ RUN apk add --no-cache libgcc && \
adduser --no-create-home --disabled-password wkd && \ adduser --no-create-home --disabled-password wkd && \
chown -R wkd:wkd /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" ] ENTRYPOINT [ "sh", "/wkd/entrypoint.sh" ]

3
entrypoint.sh Normal file
View file

@ -0,0 +1,3 @@
#!/bin/bash
chown -R wkd:wkd /wkd
su wkd -c /wkd/wkd