Skip to content

Commit 7070674

Browse files
authored
Fix typos in Optimize cache usage in builds manual
1 parent d03288e commit 7070674

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

content/manuals/build/cache/optimize.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
---
22
title: Optimize cache usage in builds
3-
description: An overview on how to optimize cache utilization in Docker builds.
3+
description: An overview of how to optimize cache utilization in Docker builds.
44
keywords: build, buildkit, buildx, guide, tutorial, mounts, cache mounts, bind mounts
55
aliases:
66
- /build/guide/mounts/
77
---
88

99
When building with Docker, a layer is reused from the build cache if the
10-
instruction and the files it depends on hasn't changed since it was previously
10+
instruction and the files it depends on haven't changed since it was previously
1111
built. Reusing layers from the cache speeds up the build process because Docker
1212
doesn't have to rebuild the layer again.
1313

1414
Here are a few techniques you can use to optimize build caching and speed up
1515
the build process:
1616

1717
- [Order your layers](#order-your-layers): Putting the commands in your
18-
Dockerfile into a logical order can help you avoid unnecessary cache
18+
Dockerfile in a logical order can help you avoid unnecessary cache
1919
invalidation.
2020
- [Keep the context small](#keep-the-context-small): The context is the set of
2121
files and directories that are sent to the builder to process a build
@@ -32,7 +32,7 @@ the build process:
3232
a package manager. Having a persistent cache for packages means that even if
3333
you rebuild a layer, you only download new or changed packages.
3434
- [Use an external cache](#use-an-external-cache): An external cache lets you
35-
store build cache at a remote location. The external cache image can be
35+
store the build cache at a remote location. The external cache image can be
3636
shared between multiple builds, and across different environments.
3737

3838
## Order your layers
@@ -59,7 +59,7 @@ This Dockerfile is rather inefficient. Updating any file causes a reinstall of
5959
all dependencies every time you build the Docker image even if the dependencies
6060
didn't change since last time.
6161

62-
Instead, the `COPY` command can be split in two. First, copy over the package
62+
Instead, the `COPY` command can be split into two. First, copy over the package
6363
management files (in this case, `package.json` and `yarn.lock`). Then, install
6464
the dependencies. Finally, copy over the project source code, which is subject
6565
to frequent change.
@@ -92,7 +92,7 @@ node_modules
9292
tmp*
9393
```
9494

95-
Ignore-rules specified in the `.dockerignore` file apply to the entire build
95+
Ignore rules specified in the `.dockerignore` file apply to the entire build
9696
context, including subdirectories. This means it's a rather coarse-grained
9797
mechanism, but it's a good way to exclude files and directories that you know
9898
you don't need in the build context, such as temporary files, log files, and
@@ -127,7 +127,7 @@ instruction is done executing, the mounted files are not persisted in the final
127127
image, or in the build cache. Only the output of the `go build` command
128128
remains.
129129

130-
The `COPY` and `ADD` instructions in a Dockerfile lets you copy files from the
130+
The `COPY` and `ADD` instructions in a Dockerfile let you copy files from the
131131
build context into the build container. Using bind mounts is beneficial for
132132
build cache optimization because you're not adding unnecessary layers to the
133133
cache. If you have build context that's on the larger side, and it's only used
@@ -341,7 +341,7 @@ jobs:
341341
cache-to: type=registry,ref=user/app:buildcache,mode=max
342342
```
343343
344-
This setup tells BuildKit to look for cache in the `user/app:buildcache` image.
344+
This setup tells BuildKit to look for the cache in the `user/app:buildcache` image.
345345
And when the build is done, the new build cache is pushed to the same image,
346346
overwriting the old cache.
347347

0 commit comments

Comments
 (0)