Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
The Source command does not have an effect on the current shell, but only on subshells. Therefore, the nvm command is not available in the current shell after the Source command. Set the NVM_DIR environment variable, then load nvm into the current shell.
  • Loading branch information
nhkhai committed May 12, 2024
1 parent 5a76fc0 commit 03f6126
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ RUN ./mvnw clean verify -DskipTests
FROM eclipse-temurin:21-jdk-jammy

# Install Node.JS and NPM via NVM.
RUN /bin/bash -c "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && source ~/.bashrc && nvm install v20.13.1 && nvm use v20.13.1"
RUN /bin/bash -c "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash && export NVM_DIR=\"$HOME/.nvm\" && [ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\" && nvm install v20.13.1 && nvm use v20.13.1"

# Install PostgreSQL and change PostgreSQL authentication to trust.
# Install the PostgreSQL package. Remove the package lists to reduce the image size.
Expand Down

0 comments on commit 03f6126

Please sign in to comment.