Skip to content

Commit

Permalink
Update for .env local build
Browse files Browse the repository at this point in the history
  • Loading branch information
KarineGEO6 committed May 6, 2024
1 parent 6dc7f72 commit 92bd7c1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,18 @@ RUN if [ ! -f .env ]; then \
echo .env; \
fi

# Intermediate stage to copy .env file if it exists
FROM base AS intermediate

# Copy .env file into the Docker image
COPY .env /app/ || true

# Final stage
FROM base

# Copy files from the intermediate stage
COPY --from=intermediate /app/.env /app/

COPY docker-entrypoint.sh /usr/local/bin/
RUN dos2unix /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
Expand Down

0 comments on commit 92bd7c1

Please sign in to comment.