Skip to content

Commit 7a93d58

Browse files
authored
docs: update contributing image size section (#1080)
1 parent 6d0037f commit 7a93d58

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

CONTRIBUTING.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,23 @@ To release a new [factory](./factory/README.md), open a PR with the desired chan
8888

8989
## Minimize image sizes
9090

91-
By default, the current base image is `bullseye-slim`. This dramatically decreases the size of all images. Other optimizations have been made to the Dockerfiles per Docker's recommendations.
91+
The `BASE_IMAGE` defined in [factory/.env](./factory/.env) uses a [Debian Docker image](https://hub.docker.com/_/debian) and the current `BASE_IMAGE` is `debian:12-slim` (codename `bookworm`). To keep the image size of the generated Cypress Docker images to a minimum, choose the `slim` variant when other versions of Debian are used, for instance when [Debian releases](https://www.debian.org/releases/) a new major version.
9292

93-
Node versions less than or equal to Node 14 will use the `buster-slim` base image if they are recreated. Older images may still rely on `buster`.
93+
To see the size of an image, you can use the command [`docker images`](https://docs.docker.com/engine/reference/commandline/images/), for instance with:
9494

95-
To see the final size of an image, you can use command [`docker images`](https://docs.docker.com/engine/reference/commandline/images/)
96-
97-
```bash
98-
$ docker images --format "{{.Tag}} {{.Size}}" cypress/base:11.13.0
99-
11.13.0 969MB
95+
```shell
96+
docker images --format "table {{.Repository}} {{.Tag}} {{.Size}}"
10097
```
10198

99+
A snapshot of current sizes shows:
100+
101+
| REPOSITORY | TAG | SIZE |
102+
| ---------------- | ----------------------------------------------------------------- | ------ |
103+
| cypress/factory | 4.0.0 | 506MB |
104+
| cypress/base | 20.13.1 | 640MB |
105+
| cypress/browsers | node-20.13.1-chrome-125.0.6422.60-1-ff-126.0-edge-125.0.2535.51-1 | 2.14GB |
106+
| cypress/included | 13.10.0 | 2.86GB |
107+
102108
### Clean up `apt-get` artifacts
103109

104110
Calling `apt-get` creates artifacts that are not necessary to the image, and these artifacts bloat the image size and all images that inherit from it.

0 commit comments

Comments
 (0)