Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ FROM ubuntu:latest
# liz rice knows best
# https://medium.com/@lizrice/non-privileged-containers-based-on-the-scratch-image-a80105d6d341
RUN useradd -u 10001 scratchuser
FROM scratch
RUN apt-get update \
&& apt-get install -y libcap2-bin
COPY nacp /nacp
RUN setcap cap_net_bind_service=+ep /nacp
FROM scratch
COPY --from=0 /nacp /nacp
COPY --from=0 /etc/passwd /etc/passwd
USER scratchuser
ENTRYPOINT ["/nacp"]