Nice article. I would like to suggest to show people also possibility to use even more stages. Nice example is using another Docker stage for building assets in case of Phoenix framework. It's easy and just a few lines of code. For example:
...
FROM node:10.16-alpine AS assets
WORKDIR /app
# Compile assets
COPY --from=builder /app/deps /app/deps
COPY assets/ /app/assets/
RUN cd /app/assets && npm install && npm run deploy
FROM builder AS release
COPY --from=assets /app/priv/static /app/priv/static
...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice article. I would like to suggest to show people also possibility to use even more stages. Nice example is using another Docker stage for building assets in case of Phoenix framework. It's easy and just a few lines of code. For example: