Skip to content

Commit

Permalink
issue 661 - dockerfile permissions (#662)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisclark authored Aug 14, 2024
1 parent 1ddb6e8 commit 3183d5e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ COPY requirements /app/requirements
RUN pip install --no-cache-dir -r requirements/dev.txt

# Install NVM and Node.js
ENV NVM_DIR /root/.nvm
RUN mkdir /usr/local/.nvm
ENV NVM_DIR /usr/local/.nvm
# This should match the version referenced below in the Run stage, and in entrypoint.sh
ENV NODE_VERSION 20.15.1

Expand All @@ -38,8 +39,8 @@ COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/pytho
COPY --from=builder /usr/local/bin /usr/local/bin

# Copy Node.js environment from builder
COPY --from=builder /root/.nvm /root/.nvm
ENV NVM_DIR /root/.nvm
COPY --from=builder /usr/local/.nvm /usr/local/.nvm
ENV NVM_DIR /usr/local/.nvm

# The version in this path should match the version referenced above in the Run stage, and in entrypoint.sh
ENV PATH $NVM_DIR/versions/node/v20.15.1/bin:$PATH
Expand Down Expand Up @@ -68,7 +69,7 @@ if queries == 0:
ORM

# Copy and set permissions for the entrypoint script
COPY --chown=myuser:myuser entrypoint.sh /entrypoint.sh
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

# Expose the ports the app runs on
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e

# Source the nvm script to set up the environment
# This should match the version referenced in Dockerfile
. /root/.nvm/nvm.sh
. /usr/local/.nvm/nvm.sh
nvm use 20.15.1

# Django
Expand Down

0 comments on commit 3183d5e

Please sign in to comment.