Whitelist files in the Dockerfile

This commit is contained in:
Jonas Lochmann 2021-06-21 02:00:00 +02:00
parent 9d08f3d324
commit 70a4d36b16
No known key found for this signature in database
GPG key ID: 8B8C9AEE10FA5B36

View file

@ -5,8 +5,11 @@ RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app WORKDIR /usr/src/app
# Install app dependencies # Install app dependencies
COPY . /usr/src/app/ COPY package.json package-lock.json tsconfig.json tslint.json Readme.md /usr/src/app/
RUN npm install --no-optional && npm run build && npm prune --production && rm -rf ./src COPY src/ /usr/src/app/src/
COPY scripts/ /usr/src/app/scripts/
COPY other/ /usr/src/app/other/
RUN mkdir -p docs/schema && npm install --no-optional && npm run build && npm prune --production && rm -rf ./src
# Start the App # Start the App
EXPOSE 8080 EXPOSE 8080