From 3b94db61ad800f0b97a816bad15cc0b064cdff92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sercan=20Yekta=C5=9F?= Date: Sat, 12 Feb 2022 13:34:16 +0300 Subject: [PATCH] fix for dockerfile npm install step When you try to build docker image from Dockerfile it fails on npm install case because alpine image that we use don't have git install --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index aafea40..69e4fb2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Install dependencies only when needed FROM node:16-alpine AS deps # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. -RUN apk add --no-cache libc6-compat +RUN apk add --no-cache libc6-compat git WORKDIR /app COPY package.json package-lock.json ./ RUN npm install @@ -43,4 +43,4 @@ ENV PORT 3000 # Uncomment the following line in case you want to disable telemetry. # ENV NEXT_TELEMETRY_DISABLED 1 -CMD ["node", "server.js"] \ No newline at end of file +CMD ["node", "server.js"]