Skip to content

Commit d60e9e5

Browse files
Merge pull request #4742 from ggiguash/bootc-embedded-image-upgrade
OCPBUGS-52420: Fix container file documentation with correct image embedding commands
2 parents 1b75c08 + 8ec41d8 commit d60e9e5

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

docs/config/Containerfile.bootc-embedded-rhel9

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,20 @@ RUN --mount=type=secret,id=pullsecret,dst=/run/secrets/pull-secret.json \
2727
# In this case, it is not necessary to update /etc/containers/storage.conf with
2828
# the additional store path.
2929
# See https://issues.redhat.com/browse/RHEL-75827
30-
RUN mkdir -p /etc/systemd/system/microshift.service.d
31-
# hadolint ignore=DL3059
30+
RUN cat > /usr/bin/microshift-copy-images <<EOF
31+
#!/bin/bash
32+
set -eux -o pipefail
33+
while IFS="," read -r img sha ; do
34+
skopeo copy --preserve-digests \
35+
"dir:${IMAGE_STORAGE_DIR}/\${sha}" \
36+
"containers-storage:\${img}"
37+
done < "${IMAGE_LIST_FILE}"
38+
EOF
39+
40+
RUN chmod 755 /usr/bin/microshift-copy-images && \
41+
mkdir -p /etc/systemd/system/microshift.service.d
42+
3243
RUN cat > /etc/systemd/system/microshift.service.d/microshift-copy-images.conf <<EOF
3344
[Service]
34-
ExecStartPre=/bin/bash -eux -o pipefail -c '\
35-
while IFS="," read -r img sha ; do \
36-
skopeo copy --preserve-digests \
37-
"dir:${IMAGE_STORAGE_DIR}/\${sha}" \
38-
"containers-storage:\${img}" ; \
39-
done < "${IMAGE_LIST_FILE}" \
40-
'
45+
ExecStartPre=/usr/bin/microshift-copy-images
4146
EOF

0 commit comments

Comments
 (0)