-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
build: add manuals section about named contexts #21672
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: David Karlsson <[email protected]>
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
# syntax=docker/dockerfile:1 | ||
FROM buildbase | ||
WORKDIR /app |
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.
I think a nice pattern is to define src
and docs
as scratch otherwise it will not find the stage if no named context is defined:
# syntax=docker/dockerfile:1 | |
FROM buildbase | |
WORKDIR /app | |
# syntax=docker/dockerfile:1 | |
FROM scratch AS src | |
FROM scratch AS docs | |
FROM buildbase | |
WORKDIR /app |
I wonder if src
as named context is necessary though. I think we could just have docs
one as named context that would run make manpages
only if /app/docs
folder has files?
|
||
- The context named `src` points to the `./src` directory on your local machine. | ||
- The context named `docs` points to the `./docs` directory on your local machine. | ||
- The `.` at the end specifies the default build context. |
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.
But default build context is not used in the dockerfile? From my previous comment we might just have docs
as named context. Maybe I miss smth from your example.
Description
Adds a section on the build contexts page about named contexts.
Related issues or tickets