From 14772ee744f598c202a530e2e0ed1757288a5b77 Mon Sep 17 00:00:00 2001 From: Dave Behnke <916775+dbehnke@users.noreply.github.com> Date: Sat, 14 Oct 2023 01:39:28 -0400 Subject: [PATCH] fix Dockerfile to work properly --- Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6593fa0..a680da5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,11 +7,13 @@ RUN make clean && make FROM debian:bookworm-slim ARG uid=1000 ARG gid=1000 -#RUN apk add file -RUN adduser -u ${uid} -g ${gid} -h /app -D gouser -USER gouser -WORKDIR /app +ARG user=gouser +ARG userhome=/app +RUN groupadd -f -g ${gid} ${user} +RUN useradd -l -u ${uid} -g ${gid} -d "${userhome}" -r ${user} +USER ${user} +WORKDIR ${userhome} COPY --from=builder /usr/src/app/gomrefdash . COPY --from=builder /usr/src/app/frontend/spa/ frontend/spa/ EXPOSE 3000 -ENTRYPOINT ./gomrefdash \ No newline at end of file +ENTRYPOINT ./gomrefdash