@@ -12,25 +12,15 @@ function version_exists() {
12
12
fi
13
13
}
14
14
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.
16
19
push () {
17
20
local arch=$1
18
21
local tag=" codercom/code-server-$arch :$VERSION "
19
-
20
22
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.
26
23
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 "
34
24
}
35
25
36
26
main () {
@@ -49,6 +39,18 @@ main() {
49
39
50
40
push " amd64"
51
41
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"
52
54
}
53
55
54
56
main " $@ "
0 commit comments