diff options
author | Alex Auvolat <alex@adnab.me> | 2022-09-26 17:19:21 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-09-26 19:09:55 +0200 |
commit | d104ae871170e5d1dac644921815bcce8496f23c (patch) | |
tree | 59ec54a001595893af56f5ed42b7eabd0b53086b /shell.nix | |
parent | ea7a571d883fcf40822ccd265e4975ac607b234a (diff) | |
download | garage-d104ae871170e5d1dac644921815bcce8496f23c.tar.gz garage-d104ae871170e5d1dac644921815bcce8496f23c.zip |
Add step to generate multi-arch Docker container in CImulti-arch-container
Diffstat (limited to 'shell.nix')
-rw-r--r-- | shell.nix | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -10,6 +10,7 @@ let overlays = [ cargo2nixOverlay ]; }; kaniko = (import ./nix/kaniko.nix) pkgs; + manifest-tool = (import ./nix/manifest-tool.nix) pkgs; winscp = (import ./nix/winscp.nix) pkgs; in @@ -84,6 +85,34 @@ function to_docker { --verbosity=debug } +function multiarch_docker { + manifest-tool push from-spec <(cat <<EOF +image: dxflrs/garage:''${CONTAINER_TAG} +manifests: + - + image: dxflrs/arm64_garage:''${CONTAINER_TAG} + platform: + architecture: arm64 + os: linux + - + image: dxflrs/amd64_garage:''${CONTAINER_TAG} + platform: + architecture: amd64 + os: linux + - + image: dxflrs/386_garage:''${CONTAINER_TAG} + platform: + architecture: 386 + os: linux + - + image: dxflrs/arm_garage:''${CONTAINER_TAG} + platform: + architecture: arm + os: linux +EOF + ) +} + function refresh_index { aws \ --endpoint-url https://garage.deuxfleurs.fr \ @@ -113,6 +142,7 @@ function refresh_index { nativeBuildInputs = [ pkgs.awscli2 kaniko + manifest-tool ]; }; } |