Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions content/manuals/offload/optimize.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -45,15 +45,15 @@ 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
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
Expand All @@ -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
Expand All @@ -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.