Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #661 - dockerfile permissions #662

Merged
merged 2 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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