Skip to content

Commit

Permalink
Prune previous app when using prebuilt image
Browse files Browse the repository at this point in the history
This ensures that files removed on a branch do have effect
  • Loading branch information
glensc committed Dec 26, 2020
1 parent 8d35be3 commit a7daebc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,14 @@ WORKDIR $APPDIR
EXPOSE 80
CMD ["sh", "-c", "nginx && exec php-fpm"]
VOLUME "/run/nginx"
COPY --from=build --chown=www-data /cache ./cache/

# runtime image from last release
FROM xhgui/xhgui:latest AS runtime-prebuilt
RUN rm -rf $(pwd)

# build final image
FROM runtime-$BUILD_SOURCE AS runtime

COPY --from=build --chown=www-data /cache ./cache/
COPY --from=build /vendor ./vendor/
COPY --from=build /app ./

0 comments on commit a7daebc

Please sign in to comment.