Skip to content

Commit 12c8de9

Browse files
authored
PE-7981 fix kairos-raw-image also with dummy userdata (#527)
* fix kairos-raw-image also with dummy userdata * fix typo
1 parent 3982658 commit 12c8de9

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

Earthfile

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,7 @@ kairos-raw-image:
10621062

10631063
# Use Docker-in-Docker to convert iso-image to raw
10641064
WITH DOCKER \
1065+
--pull $AURORABOOT_IMAGE \
10651066
--load index.docker.io/library/palette-installer-image:latest=(+iso-image)
10661067
RUN echo "=== Setting up workdir ===" && \
10671068
mkdir -p /workdir && \
@@ -1084,22 +1085,19 @@ kairos-raw-image:
10841085
echo "Consider reducing content bundle size or excluding large files."; \
10851086
fi; \
10861087
fi && \
1087-
echo "=== Running auroraboot to convert image ===" && \
1088-
echo "Using auroraboot v0.15.0 (known working version)" && \
1089-
echo "=== Docker images available ===" && \
1090-
docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}\t{{.ID}}" | head -10 && \
10911088
echo "=== Running auroraboot (this may take a while for large images) ===" && \
10921089
AURORABOOT_CMD="docker run --privileged -v /var/run/docker.sock:/var/run/docker.sock \
1093-
-v /workdir:/aurora --net host --rm quay.io/kairos/auroraboot:v0.15.0 \
1090+
-v /workdir:/aurora --net host --rm $AURORABOOT_IMAGE \
10941091
--debug \
10951092
--set \"disable_http_server=true\" \
10961093
--set \"disable_netboot=true\" \
10971094
--set \"disk.efi=true\" \
10981095
--set \"container_image=palette-installer-image:latest\" \
1099-
--set \"state_dir=/aurora\"" && \
1100-
if [ -f /workdir/user-data ]; then \
1101-
echo "Found user-data file, passing to AuroraBoot as cloud-config" && \
1102-
AURORABOOT_CMD="$AURORABOOT_CMD --cloud-config /aurora/user-data"; \
1096+
--set \"state_dir=/aurora\"
1097+
--cloud-config /aurora/user-data" && \
1098+
if [ ! -f /workdir/user-data ]; then \
1099+
echo "No user-data file found, creating a dummy cloud-config" && \
1100+
echo "#cloud-config" > /workdir/user-data; \
11031101
fi && \
11041102
eval $AURORABOOT_CMD 2>&1 | tee /workdir/auroraboot.log; \
11051103
AURORABOOT_EXIT=$?; \

0 commit comments

Comments
 (0)