Skip to content

Commit be84d23

Browse files
committed
ironic: bake in the novnc assets
1 parent 509aa8f commit be84d23

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

containers/ironic/Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ RUN apt-get update && \
1515
&& apt-get clean && rm -rf /var/lib/apt/lists/*
1616

1717
ARG OPENSTACK_VERSION="required_argument"
18+
ARG NOVNC_VERSION=1.6.0
1819
RUN --mount=type=cache,target=/root/.cache/uv \
1920
uv pip install \
2021
--constraint https://releases.openstack.org/constraints/upper/${OPENSTACK_VERSION} \
@@ -26,6 +27,16 @@ COPY containers/ironic/patches /tmp/patches/
2627
RUN cd /var/lib/openstack/lib/python3.12/site-packages && \
2728
QUILT_PATCHES=/tmp/patches quilt push -a
2829

30+
# download and unpack novnc
31+
RUN \
32+
export URL=https://github.com/novnc/noVNC/archive/refs/tags/v${NOVNC_VERSION}.tar.gz && \
33+
export DEST_FILE=novnc-${NOVNC_VERSION}.tar.gz && \
34+
export PFX=noVNC-${NOVNC_VERSION} && \
35+
rm -rf /usr/share/novnc/ && \
36+
mkdir -p /usr/share/novnc/ && \
37+
wget -q -O "$DEST_FILE" "$URL" && \
38+
tar -C /usr/share/novnc/ --strip-components=1 -zxvf "${DEST_FILE}" "$PFX/app" "$PFX/core" "$PFX/vendor" "$PFX/vnc.html"
39+
2940
ARG OPENSTACK_VERSION="required_argument"
3041
FROM quay.io/airshipit/ironic:${OPENSTACK_VERSION}-ubuntu_noble AS final
3142

@@ -43,3 +54,4 @@ RUN apt-get update && \
4354
&& apt-get clean && rm -rf /var/lib/apt/lists/*
4455

4556
COPY --from=build --link /var/lib/openstack /var/lib/openstack
57+
COPY --from=build /usr/share/novnc /usr/share/novnc

0 commit comments

Comments
 (0)