New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add run on Google Cloud Run button to the docker example #25824
Conversation
- [x] Accept changes for the cloud run button line
examples/with-docker/Dockerfile
Outdated
@@ -3,8 +3,8 @@ FROM node:14-alpine AS deps | |||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. | |||
RUN apk add --no-cache libc6-compat | |||
WORKDIR /app | |||
COPY package.json ./ | |||
RUN yarn install | |||
COPY package.json yarn.lock ./ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @leerob , thank you for merging this PR.
If yarn.lock
is added back on this line it will result in the following docker build output:
If it is expected to run yarn
on this folder before running docker build, it was not found it in the readme. In addition, a CI system say, Travis might just have docker and no node. I am not sure if this is what is intended. Happy to hear your thoughts!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can edit your code after cloning, but specifically for this example, we don't want the lockfile 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, so in this case the lock file shouldn't be referenced in the dockerfile too then?
## Documentation / Examples - [x] Make sure the linting passes ### Deployed with Cloud Run Button <img width="1075" alt="Screen Shot 2021-06-06 at 10 22 51 pm" src="https://user-images.githubusercontent.com/170554/120924210-d7946780-c715-11eb-889e-79679f795c54.png"> ### Next.js working on Google Cloud Run <img width="982" alt="Screen Shot 2021-06-06 at 10 23 10 pm" src="https://user-images.githubusercontent.com/170554/120924229-e418c000-c715-11eb-9aca-569923f7306d.png">
Documentation / Examples
Deployed with Cloud Run Button
Next.js working on Google Cloud Run