Skip to content

Commit 589982f

Browse files
committed
Fix incorrect manifest build
I mistakenly thought they were for each arch but it's for the version and latest which makes a *lot* more sense.
1 parent f720b63 commit 589982f

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

ci/steps/push-docker-manifest.sh

+16-14
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,15 @@ function version_exists() {
1212
fi
1313
}
1414

15-
# Import and push the Docker image for the provided arch.
15+
# Import and push the Docker image for the provided arch. We must have
16+
# individual arch repositories pushed remotely in order to use `docker
17+
# manifest` to create single a multi-arch image.
18+
# TODO: Switch to buildx? Seems it can do this more simply.
1619
push() {
1720
local arch=$1
1821
local tag="codercom/code-server-$arch:$VERSION"
19-
2022
docker import "./release-images/code-server-$arch-$VERSION.tar" "$tag"
21-
22-
# We have to ensure the images exists on the remote registry in order to build
23-
# the manifest. We don't put the arch in the tag to avoid polluting the main
24-
# repository. These other repositories are private so they don't pollute our
25-
# organization namespace.
2623
docker push "$tag"
27-
28-
export DOCKER_CLI_EXPERIMENTAL=enabled
29-
30-
docker manifest create "codercom/code-server:$VERSION" \
31-
"codercom/code-server-$arch:$VERSION" \
32-
"codercom/code-server-$arch:$VERSION"
33-
docker manifest push --purge "codercom/code-server:$VERSION"
3424
}
3525

3626
main() {
@@ -49,6 +39,18 @@ main() {
4939

5040
push "amd64"
5141
push "arm64"
42+
43+
export DOCKER_CLI_EXPERIMENTAL=enabled
44+
45+
docker manifest create "codercom/code-server:$VERSION" \
46+
"codercom/code-server-amd64:$VERSION" \
47+
"codercom/code-server-arm64:$VERSION"
48+
docker manifest push --purge "codercom/code-server:$VERSION"
49+
50+
docker manifest create "codercom/code-server:latest" \
51+
"codercom/code-server-amd64:$VERSION" \
52+
"codercom/code-server-arm64:$VERSION"
53+
docker manifest push --purge "codercom/code-server:latest"
5254
}
5355

5456
main "$@"

0 commit comments

Comments
 (0)