Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
liuwen committed Aug 23, 2024
1 parent f27cf51 commit c2f5405
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions katbin/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
CMD ["/app/startup.sh"]

0 comments on commit c2f5405

Please sign in to comment.