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

Bump node images to 16 that were missed previously (#1374) #1375

Merged
merged 1 commit into from
Apr 27, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
Comment on lines +26 to +30
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without changes, an error was being thrown. It seems to be related to this: https://stackoverflow.com/questions/57534295/npm-err-tracker-idealtree-already-exists-while-creating-the-docker-image-for Setting WORKDIR fixed the problem.


# 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