Unverified Commit 33784f13 authored by Kryštof Krátký's avatar Kryštof Krátký Committed by GitHub

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: 's avatarJJ Kasper <22380829+ijjk@users.noreply.github.com>
parent 66af3cee
...@@ -6,6 +6,10 @@ WORKDIR /app ...@@ -6,6 +6,10 @@ WORKDIR /app
COPY package.json yarn.lock ./ COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile RUN yarn install --frozen-lockfile
# If using npm with a `package-lock.json` comment out above and use below instead
# COPY package.json package-lock.json /
# RUN npm install
# Rebuild the source code only when needed # Rebuild the source code only when needed
FROM node:16-alpine AS builder FROM node:16-alpine AS builder
WORKDIR /app WORKDIR /app
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment