Update container to Fedora 44, use mostly distro packages
Some checks failed
/ test (push) Failing after 24s

Recently there was a regression in Pika, and it would generally be nice
to use distribution packages for most of our dependencies. Since the
image tester is already committing similar crimes I think it's fine for
the uploader, too.

Right now we only pull in the Google SDK bits from PyPI, as well as the
Azure compute module from there since the Azure CLI pins an ancient
version.

Signed-off-by: Jeremy Cline <jeremycline@microsoft.com>
This commit is contained in:
Jeremy Cline 2026-08-06 13:32:05 -04:00
commit e16b83df7f
No known key found for this signature in database
2 changed files with 40 additions and 14 deletions

View file

@ -1,23 +1,50 @@
FROM quay.io/fedora/fedora:43
FROM quay.io/fedora/fedora:44 as builder
RUN dnf install -y \
python3-pip \
python3-hatchling
RUN mkdir -p /srv/{src,dist}/
COPY . /srv/src
RUN cd /srv/src/fedora-image-uploader && hatchling build -d /srv/dist/ --target=wheel
RUN cd /srv/src/fedora-image-uploader-messages && hatchling build -d /srv/dist/ --target=wheel
FROM quay.io/fedora/fedora:44
LABEL org.opencontainers.image.authors="Fedora Cloud SIG <cloud@lists.fedoraproject.org>"
RUN mkdir -p /srv/fedora-image-uploader
WORKDIR /srv/fedora-image-uploader
COPY --from=builder /srv/dist /srv/dist
# Use the system-provided libraries as much as we can here.
#
# We do need to commit a small crime so the system-provided fedora-messaging
# library uses our virtualenv
RUN dnf install -y \
patch \
fedora-messaging \
python3-azure-identity \
python3-azure-storage-blob \
python3-boto3 \
python3-botocore \
python3-fedfind \
python3-fedora-image-uploader-messages \
python3-pip \
python3-hatchling \
python3-requests \
python3-setuptools \
skopeo
RUN mkdir -p /srv/image-uploader/
COPY . /srv/image-uploader/src
WORKDIR /srv/image-uploader
RUN python3 -m venv venv && \
venv/bin/pip install --no-cache-dir src/fedora-image-uploader-messages/ && \
venv/bin/pip install --no-cache-dir src/fedora-image-uploader/[aws,azure,gcp]
RUN python3 -m venv --system-site-packages venv && \
venv/bin/pip install --no-cache-dir /srv/dist/fedora_image_uploader_messages-*.whl && \
venv/bin/pip install --no-cache-dir /srv/dist/fedora_image_uploader-0.4.0-py3-none-any.whl[aws,azure,gcp]
RUN cp /usr/bin/fedora-messaging /srv/fedora-image-uploader/venv/bin/fedora-messaging && \
sed -i 's|/usr/bin/python3|/srv/fedora-image-uploader/venv/bin/python3|g' \
/srv/fedora-image-uploader/venv/bin/fedora-messaging
# Add the virtual environment to the path for convenience when in a debug container
ENV PATH="/srv/image-uploader/venv/bin:$PATH"
ENV PATH="/srv/fedora-image-uploader/venv/bin:$PATH"
ENV VIRTUAL_ENV="/srv/fedora-image-uploader/venv"
ENTRYPOINT ["/srv/image-uploader/venv/bin/fedora-messaging"]
ENTRYPOINT ["/srv/fedora-image-uploader/venv/bin/fedora-messaging"]
CMD ["consume", "--callback=fedora_image_uploader:Uploader"]

View file

@ -13,7 +13,6 @@ requires-python = ">=3.10"
dependencies = [
"click",
"pika <= 1.4.1",
"fedora-messaging",
"fedora-image-uploader-messages",
"fedfind",