mirror of
https://github.com/docker/docs.git
synced 2026-03-27 14:28:47 +07:00
Update offload optimize.md (#23415)
`###` should be `##` <!--Delete sections as needed --> ## Description <!-- Tell us what you did and why --> ## Related issues or tickets <!-- Related issues, pull requests, or Jira tickets --> ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [ ] Technical review - [ ] Editorial review - [ ] Product review
This commit is contained in:
@@ -29,7 +29,7 @@ setup for Docker Offload:
|
||||
|
||||
For general Dockerfile tips, see [Building best practices](/manuals/build/building/best-practices.md).
|
||||
|
||||
### dockerignore files
|
||||
## dockerignore files
|
||||
|
||||
A [`.dockerignore` file](/manuals/build/concepts/context.md#dockerignore-files)
|
||||
lets you specify which local files should *not* be included in the build
|
||||
@@ -45,7 +45,7 @@ Typical items to ignore:
|
||||
|
||||
As a rule of thumb, your `.dockerignore` should be similar to your `.gitignore`.
|
||||
|
||||
### Slim base images
|
||||
## Slim base images
|
||||
|
||||
Smaller base images in your `FROM` instructions can reduce final image size and
|
||||
improve build performance. The [`alpine`](https://hub.docker.com/_/alpine) image
|
||||
@@ -53,7 +53,7 @@ is a good example of a minimal base.
|
||||
|
||||
For fully static binaries, you can use [`scratch`](https://hub.docker.com/_/scratch), which is an empty base image.
|
||||
|
||||
### Multi-stage builds
|
||||
## Multi-stage builds
|
||||
|
||||
[Multi-stage builds](/build/building/multi-stage/) let you separate build-time
|
||||
and runtime environments in your Dockerfile. This not only reduces the size of
|
||||
@@ -62,7 +62,7 @@ the final image but also allows for parallel stage execution during the build.
|
||||
Use `COPY --from` to copy files from earlier stages or external images. This
|
||||
approach helps minimize unnecessary layers and reduce final image size.
|
||||
|
||||
### Fetch remote files in build
|
||||
## Fetch remote files in build
|
||||
|
||||
When possible, download large files from the internet during the build itself
|
||||
instead of bundling them in your local context. This avoids network transfer
|
||||
@@ -80,4 +80,4 @@ supports it, configure it to run in parallel. For example, use `make --jobs=4`
|
||||
to run four jobs simultaneously.
|
||||
|
||||
Taking advantage of available CPU resources in the cloud can significantly
|
||||
improve build time.
|
||||
improve build time.
|
||||
|
||||
Reference in New Issue
Block a user