From c2f5405d9f92a435cecc8ad2c68c827492e8be20 Mon Sep 17 00:00:00 2001 From: liuwen Date: Fri, 23 Aug 2024 10:01:05 +0800 Subject: [PATCH] Update Dockerfile --- katbin/Dockerfile | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/katbin/Dockerfile b/katbin/Dockerfile index 3f1299c..881b872 100644 --- a/katbin/Dockerfile +++ b/katbin/Dockerfile @@ -39,22 +39,19 @@ RUN mix phx.digest RUN mix do compile, release # prepare release image -FROM alpine AS app +FROM alpine:latest AS app RUN apk add --no-cache openssl ncurses-libs libstdc++ WORKDIR /app -RUN chown nobody:nobody /app +COPY --from=build /app/_build/prod/rel/ketbin ./ +COPY source/startup.sh ./ -USER nobody:nobody +RUN chmod +x /app/startup.sh && \ + chown -R nobody:nobody /app -COPY --from=build --chown=nobody:nobody /app/_build/prod/rel/ketbin ./ - -# Copy our custom startup.sh -COPY source/startup.sh /app/startup.sh - -RUN chmod +x /app/startup.sh +USER nobody ENV HOME=/app -CMD ["/app/bin/ketbin", "start"] \ No newline at end of file +CMD ["/app/startup.sh"] \ No newline at end of file