Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-introduce: Update syft image and doc - use docker commands #1319

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
39 changes: 30 additions & 9 deletions docs/update-syft.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,40 @@ To do this:
```

2. Find the [latest version of Syft][2]
3. Install [Skopeo][3]
4. Use [`skopeo`][4] to copy the manifest and images to our Azure Container Registry:
3. Pull the latest container image

```
skopeo copy --all docker://docker.io/anchore/syft:{LATEST} docker://governancecontainerregistry.azurecr.io/syft:{LATEST}
$ docker pull docker.io/anchore/syft:v{LATEST}
v0.53.4: Pulling from anchore/syft
0d60d5ab2113: Pull complete
26136f3e3dd3: Pull complete
497aa7f04842: Pull complete
Digest: sha256:37e85e8efdeaabb1b6f65c5bc175b664cb05d1aaddd0d922130b8e25d6e49726
Status: Downloaded newer image for anchore/syft:v{LATEST}
docker.io/anchore/syft:v{LATEST}
```

5. Update the container reference in [`LinuxScanner`][5]
6. Update [the models][6] that map the Syft output
4. Retag the container image

```
$ docker tag docker.io/anchore/syft:v{LATEST} governancecontainerregistry.azurecr.io/syft:v{LATEST}
```

5. Push the new image to the registry

```
$ docker push governancecontainerregistry.azurecr.io/syft:v{LATEST}
The push refers to repository [governancecontainerregistry.azurecr.io/syft]
9c858c120b14: Pushed
840f3b941d62: Pushed
21ce82bb7448: Pushed
v{LATEST}: digest: sha256:04ed9c717a814fdccf52758b67333632a0ff16840fc393f5fba5864285eaebbe size: 945
```

6. Update the container reference in [`LinuxScanner`][3]
7. Update [the models][4] that map the Syft output

[1]: https://github.com/anchore/syft
[2]: https://github.com/anchore/syft/releases/latest
[3]: https://github.com/containers/skopeo/blob/main/install.md
[4]: https://github.com/containers/skopeo
[5]: https://github.com/microsoft/component-detection/blob/aaf865e38112fb2448f5866ab06d5898358403f6/src/Microsoft.ComponentDetection.Detectors/linux/LinuxScanner.cs#L20
[6]: https://github.com/microsoft/component-detection/blob/main/src/Microsoft.ComponentDetection.Detectors/linux/Contracts/SyftOutput.cs
[3]: https://github.com/microsoft/component-detection/blob/aaf865e38112fb2448f5866ab06d5898358403f6/src/Microsoft.ComponentDetection.Detectors/linux/LinuxScanner.cs#L20
[4]: https://github.com/microsoft/component-detection/blob/main/src/Microsoft.ComponentDetection.Detectors/linux/Contracts/SyftOutput.cs
Loading
Loading