Skip to content

Commit

Permalink
Bump node image to 16 that was missed previously; add WORKDIR (#1375)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssciolla committed Apr 27, 2022
1 parent 3cd8518 commit 32682c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ RUN apt-get update && \
rm -rf /usr/src/app/assets/src

# build node libraries for production mode
FROM node:14-slim AS node-prod-deps
FROM node:16-slim AS node-prod-deps

WORKDIR /usr/src/app
COPY --from=node-webpack /usr/src/app /usr/src/app
RUN npm prune --production && \
# This is needed to clean up the examples files as these cause collectstatic to fail (and take up extra space)
find /usr/src/app/node_modules -type d -name "examples" -print0 | xargs -0 rm -rf
find node_modules -type d -name "examples" -print0 | xargs -0 rm -rf

# FROM directive instructing base image to build upon
FROM python:3.8-slim AS app
Expand Down
5 changes: 3 additions & 2 deletions dockerfiles/Dockerfile.openshift
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ RUN apt-get update && \
rm -rf /usr/src/app/assets/src

# build node libraries for production mode
FROM docker-registry.default.svc:5000/openshift/node:14-slim AS node-prod-deps
FROM docker-registry.default.svc:5000/openshift/node:16-slim AS node-prod-deps

WORKDIR /usr/src/app
COPY --from=node-webpack /usr/src/app /usr/src/app
RUN npm prune --production && \
# This is needed to clean up the examples files as these cause collectstatic to fail (and take up extra space)
find /usr/src/app/node_modules -type d -name "examples" -print0 | xargs -0 rm -rf
find node_modules -type d -name "examples" -print0 | xargs -0 rm -rf

# FROM directive instructing base image to build upon
FROM docker-registry.default.svc:5000/openshift/python:3.8-slim AS app
Expand Down

0 comments on commit 32682c0

Please sign in to comment.