Skip to content

Commit

Permalink
.goreleaser: add support for arm based docker image
Browse files Browse the repository at this point in the history
Adding arm support to our Scylla-manager docker image

This will only build addtional docker image, the publish part will be
done as part of scylladb/scylla-pkg#3239

Closes: scylladb#3278
  • Loading branch information
yaronkaikov committed May 19, 2023
1 parent e25e514 commit 7d544f4
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 13 deletions.
61 changes: 54 additions & 7 deletions dist/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
9 changes: 6 additions & 3 deletions dist/docker/scylla-manager-agent.dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
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-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/
Expand Down
8 changes: 5 additions & 3 deletions dist/docker/scylla-manager.dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 7d544f4

Please sign in to comment.