forked from shibao/cannery
fix dockerfile
This commit is contained in:
parent
37d101a71e
commit
20988ac1ec
@ -25,13 +25,12 @@ RUN npm --prefix ./assets ci --progress=false --no-audit --loglevel=error
|
|||||||
COPY lib lib
|
COPY lib lib
|
||||||
COPY priv priv
|
COPY priv priv
|
||||||
COPY assets assets
|
COPY assets assets
|
||||||
RUN npm run --prefix ./assets deploy
|
|
||||||
RUN mix do phx.digest, gettext.extract
|
RUN mix do phx.digest, gettext.extract
|
||||||
|
|
||||||
# compile and build release
|
# compile and build release
|
||||||
# uncomment COPY if rel/ exists
|
# uncomment COPY if rel/ exists
|
||||||
# COPY rel rel
|
# COPY rel rel
|
||||||
RUN mix do compile, release
|
RUN mix do assets.deploy, compile, release
|
||||||
|
|
||||||
# prepare release image
|
# prepare release image
|
||||||
FROM alpine:latest AS app
|
FROM alpine:latest AS app
|
||||||
@ -43,6 +42,8 @@ WORKDIR /app
|
|||||||
|
|
||||||
RUN chown nobody:nobody /app
|
RUN chown nobody:nobody /app
|
||||||
|
|
||||||
|
ENV MIX_ENV=prod
|
||||||
|
|
||||||
USER nobody:nobody
|
USER nobody:nobody
|
||||||
|
|
||||||
COPY --from=build --chown=nobody:nobody /app/_build/prod/rel/cannery ./
|
COPY --from=build --chown=nobody:nobody /app/_build/prod/rel/cannery ./
|
||||||
|
Loading…
x
Reference in New Issue
Block a user