diff --git a/dist/.goreleaser.yaml b/dist/.goreleaser.yaml index e673985f88..623fcaa4db 100644 --- a/dist/.goreleaser.yaml +++ b/dist/.goreleaser.yaml @@ -232,19 +232,66 @@ nfpms: dockers: - ids: - - server - - client + - server + - client + use: docker + goos: linux + goarch: amd64 image_templates: - - "scylladb/scylla-manager:{{ .Version }}" - dockerfile: docker/scylla-manager.dockerfile + - "scylladb/scylla-manager:{{ .Version }}-x86_64" + dockerfile: + docker/scylla-manager.dockerfile extra_files: - docker/scylla-manager.yaml + build_flag_templates: + - "--build-arg=BASE_IMAGE=ubuntu:22.04" + - "--build-arg=ARCH=amd64" - ids: - - agent + - server + - client + use: docker + goos: linux + goarch: arm64 + image_templates: + - "scylladb/scylla-manager:{{ .Version }}-aarch64" + dockerfile: + docker/scylla-manager.dockerfile + extra_files: + - docker/scylla-manager.yaml + build_flag_templates: + - "--build-arg=BASE_IMAGE=arm64v8/ubuntu:22.04" + - "--build-arg=ARCH=arm64" + + - ids: + - agent + use: docker + goos: linux + goarch: amd64 image_templates: - - "scylladb/scylla-manager-agent:{{ .Version }}" - dockerfile: docker/scylla-manager-agent.dockerfile + - "scylladb/scylla-manager-agent:{{ .Version }}-x86_64" + dockerfile: + docker/scylla-manager-agent.dockerfile + extra_files: + - docker/scylla-manager.yaml + build_flag_templates: + - "--build-arg=BASE_IMAGE=ubuntu:22.04" + - "--build-arg=ARCH=amd64" + + - ids: + - agent + use: docker + goos: linux + goarch: arm64 + image_templates: + - "scylladb/scylla-manager-agent:{{ .Version }}-aarch64" + dockerfile: + docker/scylla-manager-agent.dockerfile + extra_files: + - docker/scylla-manager.yaml + build_flag_templates: + - "--build-arg=BASE_IMAGE=arm64v8/ubuntu:22.04" + - "--build-arg=ARCH=arm64" checksum: name_template: 'checksums' diff --git a/dist/docker/scylla-manager-agent.dockerfile b/dist/docker/scylla-manager-agent.dockerfile index a30e3f8de8..a6f8e2dcd2 100644 --- a/dist/docker/scylla-manager-agent.dockerfile +++ b/dist/docker/scylla-manager-agent.dockerfile @@ -1,4 +1,7 @@ -FROM ubuntu:22.04 +ARG BASE_IMAGE + +FROM $BASE_IMAGE +ARG ARCH RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates && \ @@ -6,8 +9,8 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -COPY scylla-manager-agent*.deb / -RUN dpkg -i scylla-manager-agent*.deb && rm /scylla-manager-agent*.deb +COPY scylla-manager-agent*$ARCH.deb / +RUN dpkg -i scylla-manager-agent*$ARCH.deb && rm /scylla-manager-agent*.deb USER scylla-manager ENV HOME /var/lib/scylla-manager/ diff --git a/dist/docker/scylla-manager.dockerfile b/dist/docker/scylla-manager.dockerfile index 541f6a08be..c50d03b8df 100644 --- a/dist/docker/scylla-manager.dockerfile +++ b/dist/docker/scylla-manager.dockerfile @@ -1,13 +1,15 @@ -FROM ubuntu:22.04 +ARG BASE_IMAGE +FROM $BASE_IMAGE +ARG ARCH RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates && \ apt-get autoremove -y && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -COPY scylla-manager-*.deb / -RUN dpkg -i scylla-manager-*.deb && rm /scylla-manager-*.deb +COPY scylla-manager-*$ARCH.deb / +RUN dpkg -i scylla-manager-*$ARCH.deb && rm /scylla-manager-*.deb COPY docker/scylla-manager.yaml /etc/scylla-manager/ USER scylla-manager