Skip to content

Commit 2722302

Browse files
authored
Add wget to release build (#190)
## Ticket n/a ## Changes - Add wget to release build - Also port over the `apt-get upgrade` and removal of apt cache lists, since those seemed like good ideas too - from https://github.com/navapbc/template-application-flask/blob/main/app/Dockerfile#L21 ## Context for reviewers - wget is required for health checks ## Testing <img width="264" alt="image" src="https://github.com/navapbc/template-application-nextjs/assets/31424131/6de95bbe-c2e9-4673-b0dd-f69d416fae63">
1 parent 8072f49 commit 2722302

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ RUN npm run build -- --no-lint
5959
FROM node:18-bullseye-slim AS release
6060
WORKDIR /app
6161

62+
RUN apt-get update \
63+
# Install security updates
64+
# https://pythonspeed.com/articles/security-updates-in-docker/
65+
&& apt-get upgrade --yes \
66+
# Install wget, required for health checks
67+
wget \
68+
# Reduce the image size by clearing apt cached lists
69+
&& rm -fr /var/lib/apt/lists/*
70+
6271
# Release stage doesn't have a need for `npm`, so remove it to avoid
6372
# any vulnerabilities specific to NPM
6473
RUN npm uninstall -g npm

0 commit comments

Comments
 (0)