Skip to content

Commit

Permalink
fix: install curl when one is root
Browse files Browse the repository at this point in the history
  • Loading branch information
nimish-ks committed Oct 24, 2023
1 parent e1a980e commit f37715f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ FROM node:alpine AS base
# set working directory
WORKDIR /app

# install system dependencies
RUN apk add curl

# Add a new user "app" and change ownership of the /app directory
RUN addgroup app && adduser -S -G app app && chown -R app:app /app

Expand All @@ -15,12 +18,9 @@ COPY --chown=app:app package.json yarn.lock ./
# ---- Dependencies ----
FROM base AS dependencies

# install system dependencies
RUN apk add curl

# install node packages
RUN yarn install --frozen-lockfile --no-cache && yarn cache clean
# copy production node_modules aside (this is a neat trick to get only production modules)
# copy production node_modules aside
RUN cp -R node_modules /tmp/node_modules
# install ALL node_modules, including 'devDependencies'
RUN yarn install --frozen-lockfile
Expand Down

0 comments on commit f37715f

Please sign in to comment.