Skip to content

Commit f31e03b

Browse files
committed
docs: remove obsolete arm64 build instructions
1 parent d7665e4 commit f31e03b

File tree

1 file changed

+0
-59
lines changed

1 file changed

+0
-59
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -205,62 +205,3 @@ In CI, the images are built and tested in real `arm64` and `x64` architectures.
205205
│ └──────────────────────────────────────┘ │
206206
└─────────────────────────────────────────────┘
207207
```
208-
209-
### Updating images to add `linux/arm64`
210-
211-
Using the `docker` CLI, you can build the `linux/arm64` image of an image, glue the existing `linux/amd64` image to it to create a "manifest list", and then push that to update the current tag on the registry. The end result is that `amd64` users will see no change at all, while `arm64` users will now get the correct `arm64` image.
212-
213-
<details>
214-
<summary>Step-by-step instructions:</summary>
215-
216-
These steps assume you have Docker Hub and ECR credentials.
217-
218-
When following these steps, you may get into a state where you have cached copies of images causing wrong behavior. If this happens, delete the offending images, or `docker system prune --all` to be safe.
219-
220-
1. Ensure that the entire `FROM` chain of this image has a `linux/arm64` version, and follow this guide for those `FROM` images if necessary. For example, generating an `arm64` `cypress/browsers:node1.2.3-chrome100` would require an `arm64` `cypress/base:1.2.3` image.
221-
2. Re-run the `yarn add:<type>:image` command to update the `Dockerfile` folder with any changes in the build scripts. The correct command is at the top of every `build.sh` file in a comment. Verify that this has replaced the existing image and not caused any unexpected changes, like generating in the wrong directory.
222-
3. `cd` into the `Dockerfile` folder.
223-
4. Build the image and tag it with `tmp`:
224-
```shell
225-
docker build -t cypress/<image>:tmp --platform linux/arm64 .
226-
```
227-
5. Manually validate that the image works as expected and is really in `arm64`:
228-
```shell
229-
docker run -it cypress/<image>:tmp node -p "process.arch" # expect arm64
230-
```
231-
6. Push the `tmp` tag, and record the digest string (`sha256:hexadecimal...`). This is your `arm64` digest string.
232-
```shell
233-
docker push cypress/<image>:tmp
234-
# example output:
235-
# [...]
236-
# tmp: digest: sha256:6c38510771b756153b6f4d54c3ef9185006c1659f725e79d4999cd6304720353 size: 3659
237-
```
238-
7. Find the current `amd64` digest string, either by using Docker Hub to browse tags, or `docker image inspect cypress/...`
239-
8. Create a combined manifest using the existing name:
240-
241-
```shell
242-
docker manifest create cypress/<image>:<tag> \
243-
cypress/<image>:tmp@sha256:rest-of-arm64-digest \
244-
cypress/<image>:<tag>@sha256:rest-of-amd64-digest
245-
246-
# example:
247-
# docker manifest create cypress/included:10.3.0 \
248-
# cypress/included:tmp@sha256:6c38510771b756153b6f4d54c3ef9185006c1659f725e79d4999cd6304720353 \
249-
# cypress/included:10.3.0@sha256:942468cdb722c408607093f60eeb1b4ff098a384f9123bf2ded36f55d4c96352
250-
```
251-
252-
9. Run `docker manifest push cypress/<image>:<tag>` to push the completed manifest to Docker Hub.
253-
10. Validate that the pushed image is correct.
254-
11. To publish to ECR, use `docker login` to switch accounts and follow the below, slightly modified, steps - you don't need to rebuild the `linux/arm64` version. ECR Digest strings may differ from the Hub Digest strings since they are built separately.
255-
```shell
256-
docker login --username AWS --password $(aws ecr-public get-login-password --region us-east-1) public.ecr.aws/cypress-io
257-
# tag+push the arm64 build to public.ecr.aws
258-
docker tag cypress/$IMAGE_NAME:$TAG@sha256:$ARM64_DIGEST public.ecr.aws/cypress-io/cypress/$IMAGE_NAME:tmp
259-
# create a local tag for the public.ecr.aws amd64 build
260-
docker pull public.ecr.aws/cypress-io/cypress/$IMAGE_NAME:$TAG
261-
# create an arm64+amd64 manifest + replace the old image with the manifest
262-
docker manifest create public.ecr.aws/cypress-io/cypress/$IMAGE_NAME:$TAG public.ecr.aws/cypress-io/cypress/$IMAGE_NAME:$TAG public.ecr.aws/cypress-io/cypress/$IMAGE_NAME:tmp
263-
docker manifest push public.ecr.aws/cypress-io/cypress/$IMAGE_NAME:$TAG
264-
```
265-
12. Delete the `tmp` tag.
266-
</details>

0 commit comments

Comments
 (0)