Skip to content

Commit 33784f1

Browse files
krystxfijjk
andauthored
Fix with-docker example dockerfile (#33695)
Fixed `dockerfile` in `with-docker` example ## Bug - error when executing `docker build -t nextjs-docker .` - `yarn.lock` file is missing ## Documentation / Examples - edited to not fail when `package-lock.json` or `yarn.lock` are not found - example: use `with-docker` example - [x] Make sure the linting passes by running yarn lint Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
1 parent 66af3ce commit 33784f1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

examples/with-docker/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ WORKDIR /app
66
COPY package.json yarn.lock ./
77
RUN yarn install --frozen-lockfile
88

9+
# If using npm with a `package-lock.json` comment out above and use below instead
10+
# COPY package.json package-lock.json /
11+
# RUN npm install
12+
913
# Rebuild the source code only when needed
1014
FROM node:16-alpine AS builder
1115
WORKDIR /app

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy