From afed8f764d1c82e3cc1e82f83c6d1984a54faaf1 Mon Sep 17 00:00:00 2001 From: Ryan Lewis <93001277+rylew1@users.noreply.github.com> Date: Tue, 23 Apr 2024 15:02:36 -0700 Subject: [PATCH] [Issue #1813]: try libc fix (#1814) ## Summary Fixes #1813 ## Changes proposed - run command in frontend and api docker to update libc --- api/Dockerfile | 9 +++++---- frontend/Dockerfile | 6 ++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index 513944933..865470154 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -15,10 +15,11 @@ RUN apt-get update \ # https://pythonspeed.com/articles/security-updates-in-docker/ && apt-get upgrade --yes \ && apt-get install --no-install-recommends --yes \ - build-essential \ - libpq-dev \ - postgresql \ - wget \ + libc-bin libc6 \ + build-essential \ + libpq-dev \ + postgresql \ + wget \ # Reduce the image size by clear apt cached lists # Complies with https://github.com/codacy/codacy-hadolint/blob/master/codacy-hadolint/docs/description/DL3009.md && rm -fr /var/lib/apt/lists/* \ diff --git a/frontend/Dockerfile b/frontend/Dockerfile index f995f1bd1..21373e59f 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -62,6 +62,12 @@ RUN npm run build -- --no-lint FROM node:20-bullseye-slim AS release WORKDIR /frontend +# Update system and install security updates +RUN apt-get update \ + && apt-get install -y --only-upgrade libc-bin libc6 \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + RUN mkdir -p /frontend/.next/cache/images/ VOLUME ["/frontend/.next/cache/images/"]