Skip to content

Commit

Permalink
Build ironicclient using debian based python image
Browse files Browse the repository at this point in the history
This should reduce the size of the container from 340MB to 230MB

Signed-off-by: Riccardo Pittau <[email protected]>
  • Loading branch information
elfosardo committed Dec 5, 2024
1 parent 276cd0e commit ee2e7c5
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions resources/ironic-client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
FROM quay.io/centos/centos:stream9
ARG BASE_IMAGE=docker.io/library/python:3.9-slim-bookworm

FROM $BASE_IMAGE

# Help people find the actual baremetal command
COPY scripts/openstack /usr/bin/openstack

RUN dnf install -y python3 python3-pip genisoimage && \
pip install python-ironicclient --prefix /usr --no-cache-dir && \
chmod +x /usr/bin/openstack && \
dnf update -y && \
dnf clean all && \
rm -rf /var/cache/{yum,dnf}/*
RUN apt-get update && \
apt-get install -y genisoimage && \
apt-get clean && \
pip3 install --prefix /usr --no-cache-dir python-ironicclient && \
chmod +x /usr/bin/openstack

ENTRYPOINT ["/usr/bin/baremetal"]

0 comments on commit ee2e7c5

Please sign in to comment.