refactor: copy code into initial base image via docker build

The previous method used an ephemeral container, which was slightly more convoluted and required cleanup. The new method also allows us to set an initial WORKDIR, which is useful for ensuring 'docker exec' works as expected.
This commit is contained in:
Jose Diaz-Gonzalez
2024-02-25 12:40:03 -05:00
parent 6cc46c3ad1
commit 2c47284b31
2 changed files with 14 additions and 10 deletions

View File

@@ -0,0 +1,7 @@
ARG APP_IMAGE
FROM $APP_IMAGE
ARG DOKKU_APP_USER herokuishuser
RUN USER=$DOKKU_APP_USER /exec true
COPY --chown=$DOKKU_APP_USER . /app
WORKDIR /app