Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(manager docker) switch to be based on ubi9-minimal #4244

Merged
merged 1 commit into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions dist/.goreleaser-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ dockers:
- docker/scylla-manager.yaml
- release/
build_flag_templates:
- "--build-arg=ARCH=arm64"
- "--platform=linux/arm64"
- "--build-arg=ARCH=aarch64"
- "--platform=linux/aarch64"

- ids:
use: docker
Expand All @@ -56,8 +56,8 @@ dockers:
- docker/scylla-manager.yaml
- release
build_flag_templates:
- "--build-arg=ARCH=arm64"
- "--platform=linux/arm64"
- "--build-arg=ARCH=aarch64"
- "--platform=linux/aarch64"

docker_manifests:
- id: scylla-manager
Expand Down
16 changes: 7 additions & 9 deletions dist/docker/scylla-manager-agent.dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
FROM ubuntu
ARG ARCH=amd64
FROM docker.io/redhat/ubi9-minimal:latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have used quay.io really.

It's unclear why we use latest, but we can review this decision later.

Copy link
Contributor

@mykaul mykaul Feb 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, we should use registry.access.redhat.com/ubi9/ubi-minimal:latest

ARG ARCH=x86_64

RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y --no-install-recommends ca-certificates && \
apt-get autoremove -y && \
apt-get clean && \
RUN microdnf update && \
microdnf -y upgrade && \
microdnf install -y ca-certificates && \
rm -rf /var/lib/apt/lists/*
Copy link
Contributor

@mykaul mykaul Feb 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the way to clean microdnf residue?

I thought it is
microdnf clean all


COPY release/scylla-manager-agent*$ARCH.deb /
RUN dpkg -i scylla-manager-agent*$ARCH.deb && rm /scylla-manager-agent*.deb
COPY release/scylla-manager-agent*$ARCH.rpm /
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This creates another layer, which I assume we don't squash later?

RUN rpm -ivh scylla-manager-agent*$ARCH.rpm && rm /scylla-manager-agent*.rpm

USER scylla-manager
ENV HOME=/var/lib/scylla-manager/
Expand Down
16 changes: 7 additions & 9 deletions dist/docker/scylla-manager.dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
FROM ubuntu
ARG ARCH=amd64
FROM docker.io/redhat/ubi9-minimal:latest
ARG ARCH=x86_64

RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y --no-install-recommends ca-certificates && \
apt-get autoremove -y && \
apt-get clean && \
RUN microdnf update && \
microdnf -y upgrade && \
microdnf install -y ca-certificates && \
rm -rf /var/lib/apt/lists/*

COPY release/scylla-manager-*$ARCH.deb /
RUN dpkg -i scylla-manager-*$ARCH.deb && rm /scylla-manager-*.deb
COPY release/scylla-manager-*$ARCH.rpm /
RUN rpm -ivh scylla-manager-*$ARCH.rpm && rm /scylla-manager-*.rpm
COPY docker/scylla-manager.yaml /etc/scylla-manager/

USER scylla-manager
Expand Down