mirror of
https://git.verdigado.com/NB-Public/simple-wkd.git
synced 2024-12-05 03:32:49 +01:00
Improve wkd user
This commit is contained in:
parent
8cf300d322
commit
44d9147bc7
2 changed files with 7 additions and 5 deletions
|
@ -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
3
entrypoint.sh
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
chown -R wkd:wkd /wkd
|
||||||
|
su wkd -c /wkd/wkd
|
Loading…
Reference in a new issue