Skip to content

fix: use COPY heredoc in GNOME 48-50 Dockerfiles (fixes broken image builds) - #3

Open
jeevesforjoel wants to merge 1 commit into
jkitching:mainfrom
jeevesforjoel:add-gnome-50
Open

fix: use COPY heredoc in GNOME 48-50 Dockerfiles (fixes broken image builds)#3
jeevesforjoel wants to merge 1 commit into
jkitching:mainfrom
jeevesforjoel:add-gnome-50

Conversation

@jeevesforjoel

Copy link
Copy Markdown

Problem

The weekly image build CI has been failing for gnome-shell-48, gnome-shell-49, gnome-shell-49-x11, and gnome-shell-50 since they were added (run 29232568352):

ERROR: failed to build: failed to solve: dockerfile parse error on line 28:
unknown instruction: GSK_RENDERER=cairo

Root cause

All four Dockerfiles use the dockerfile:1.4 syntax directive, then write a wrapper script via a shell heredoc inside RUN:

RUN cat > /path <<'EOF'
#!/bin/sh
GSK_RENDERER=cairo ...
EOF

With the dockerfile:1.4 syntax parser active, the <<'EOF' inside a RUN command is interpreted as a Dockerfile-level heredoc, not a shell heredoc. The parser then reads #!/bin/sh and GSK_RENDERER=cairo as Dockerfile instructions, causing the parse error.

Fix

Replace RUN cat > /path <<'EOF' with COPY <<'EOF' /path — the correct Dockerfile 1.4 syntax for writing file content inline.

Also adds the missing # syntax=docker/dockerfile:1.4 directive to gnome-shell-49-x11.Dockerfile.

This unblocks the soft-brightness-plus E2E tests for GNOME 48/49/50, which pull these images from ghcr.io/jkitching/.

RUN cat > /path <<'EOF' is misinterpreted when the dockerfile:1.4 syntax
parser is active — the parser treats the shell heredoc as a Dockerfile
heredoc and reads subsequent lines as Dockerfile instructions, causing
'unknown instruction: GSK_RENDERER=cairo'.

Fix: use `COPY <<'EOF' /path` (the correct Dockerfile 1.4 syntax for
writing file content) instead of cat+heredoc inside RUN.

Also adds the # syntax=docker/dockerfile:1.4 directive to gnome-shell-49-x11
which was missing it.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant