Skip to content

Commit

Permalink
Fix with-docker example dockerfile (#33695)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
krystxf and ijjk committed Jan 27, 2022
1 parent 66af3ce commit 33784f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/with-docker/Dockerfile
Expand Up @@ -6,6 +6,10 @@ WORKDIR /app
COPY package.json yarn.lock ./
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
FROM node:16-alpine AS builder
WORKDIR /app
Expand Down

0 comments on commit 33784f1

Please sign in to comment.