Skip to content

Commit 3183d5e

Browse files
authored
issue 661 - dockerfile permissions (#662)
1 parent 1ddb6e8 commit 3183d5e

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ COPY requirements /app/requirements
1414
RUN pip install --no-cache-dir -r requirements/dev.txt
1515

1616
# Install NVM and Node.js
17-
ENV NVM_DIR /root/.nvm
17+
RUN mkdir /usr/local/.nvm
18+
ENV NVM_DIR /usr/local/.nvm
1819
# This should match the version referenced below in the Run stage, and in entrypoint.sh
1920
ENV NODE_VERSION 20.15.1
2021

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

4041
# Copy Node.js environment from builder
41-
COPY --from=builder /root/.nvm /root/.nvm
42-
ENV NVM_DIR /root/.nvm
42+
COPY --from=builder /usr/local/.nvm /usr/local/.nvm
43+
ENV NVM_DIR /usr/local/.nvm
4344

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

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

7475
# Expose the ports the app runs on

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -e
55

66
# Source the nvm script to set up the environment
77
# This should match the version referenced in Dockerfile
8-
. /root/.nvm/nvm.sh
8+
. /usr/local/.nvm/nvm.sh
99
nvm use 20.15.1
1010

1111
# Django

0 commit comments

Comments
 (0)