fix(docker): execute within /app

This commit is contained in:
Borja Canseco
2020-05-31 17:20:39 -05:00
parent dba038447a
commit 7381966485

View File

@@ -3,8 +3,8 @@ FROM node:14.3.0
# When running as a GitHub Action, the WORKDIR is controlled by GitHub.
# Furthermore, they recommend NOT setting it in the Dockerfile, which makes running locally difficult.
# Thus we copy files to an /app directory to be used when running Docker outside GitHub Actions.
# Thus we copy files to an /app directory to also be used when running Docker outside GitHub Actions.
COPY . /app
# Executing a shell is required for environment variable substitution when running as a GitHub Action.
ENTRYPOINT ["sh", "-c", "npm install --production && npm start"]
ENTRYPOINT ["sh", "-c", "cd /app && npm install --production && npm start"]