Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Dockerfile add WORKDIR (#4158)
Browse files Browse the repository at this point in the history
* fix: use relative paths for build copy steps

* fix: attempt to use correct paths for copy steps

* fix: merge conflict

* fix: add workdir

Co-authored-by: VWSCoronaDashboard24 <[email protected]>
  • Loading branch information
1 parent c867a42 commit 7b7da75
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ RUN apk add --no-cache --virtual \
# Layer cache for rebuilds without sourcecode changes.
# This relies on the JSONS being downloaded by the builder.
FROM deps as builder
WORKDIR /app
COPY . .

RUN yarn workspace @corona-dashboard/common build \
&& yarn workspace @corona-dashboard/cli generate-data-types \
&& yarn workspace @corona-dashboard/icons build \
Expand Down Expand Up @@ -93,9 +95,9 @@ RUN apk add --no-cache \
RUN addgroup -g 1001 -S nodejs \
&& adduser -S nextjs -u 1001

COPY --from=builder --chown=nextjs:nodejs ./app/packages/app/.next/standalone ./.next/standalone
COPY --from=builder --chown=nextjs:nodejs ./app/packages/app/.next/static ./.next/standalone/packages/app/.next/static
COPY --from=builder ./app/packages/app/next.config.js ./.next/standalone/packages/app
COPY --from=builder --chown=nextjs:nodejs /app/packages/app/.next/standalone ./.next/standalone
COPY --from=builder --chown=nextjs:nodejs /app/packages/app/.next/static ./.next/standalone/packages/app/.next/static
COPY --from=builder /app/packages/app/next.config.js ./.next/standalone/packages/app

RUN mkdir -p ./.next/standalone/packages/app/public/images/choropleth
RUN chown -R nextjs:nodejs ./.next/standalone/packages/app/public/images/choropleth
Expand Down

0 comments on commit 7b7da75

Please sign in to comment.