Skip to content

Conversation

@stefanhellander
Copy link
Collaborator

@stefanhellander stefanhellander commented Apr 4, 2025

Description

Switch to a "distroless" base image.

Note that it will not be possible to run shell scripts in this image, so integration tests are not working.

@github-actions github-actions bot added minor feature New feature or request and removed minor labels Apr 4, 2025
@stefanhellander stefanhellander changed the title FEDn container uses distroless image feature/SK-1519 | FEDn container uses distroless image Apr 4, 2025
@stefanhellander stefanhellander changed the title feature/SK-1519 | FEDn container uses distroless image Feature/SK-1519 | FEDn container uses distroless image Apr 4, 2025
# Stage 1: Builder
ARG BASE_IMG=python:3.12-slim
FROM $BASE_IMG AS builder
FROM python:3.11-slim AS builder
Copy link
Member

Choose a reason for hiding this comment

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

why downgrade python?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The distroless image seems to be 3.11

wget -qO /build/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
chmod +x /build/grpc_health_probe; \
fi
RUN mkdir /python-dist \
Copy link
Member

Choose a reason for hiding this comment

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

where is fedn installed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

RUN mkdir /python-dist
&& pip install --upgrade pip
&& pip install --prefix=/python-dist --no-cache-dir 'setuptools>=65' .

Copy link
Member

@Wrede Wrede left a comment

Choose a reason for hiding this comment

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

On your note, there are no shell scripts running in the image? In the CI tests scripts are run in ubuntu images provided by github.

@github-actions github-actions bot added the minor label Apr 4, 2025
@stefanhellander
Copy link
Collaborator Author

On your note, there are no shell scripts running in the image? In the CI tests scripts are run in ubuntu images provided by github.

The "hooks" container did assume a shell existed, but that can be fixed. However, it won't be possible to run clients in these containers as they execute a script as a subprocess using "bash" (like the training script).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants