Skip to content

Commit

Permalink
configure dockerfile to work with rsc
Browse files Browse the repository at this point in the history
  • Loading branch information
abimichel committed Dec 24, 2024
1 parent d2937a9 commit b5d61c2
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,14 @@ ENV NPM_CONFIG_CACHE=/opt/app-root/src/app/.npm-cache
# Set working directory
WORKDIR /opt/app-root/src/app

# Grant full permissions on working dir
RUN chmod -R 777 /opt/app-root/src/app

# Copy application source code
COPY . /opt/app-root/src

# Switch to root user to change ownership
USER root

# Create the npm cache directory and ensure the correct ownership
RUN mkdir -p $NPM_CONFIG_CACHE && chown -R 1001:1001 /opt/app-root/src/app

# Switch back to non-root user
USER 1001:1001
RUN mkdir -p $NPM_CONFIG_CACHE

# Install dependencies and build the application
RUN npm run all:ci \
Expand Down

0 comments on commit b5d61c2

Please sign in to comment.