Skip to content

Fix Dockerfile COPY syntax for multi-file copy#38

Open
dcasota wants to merge 1 commit intovmware:masterfrom
dcasota:fix/dockerfile-copy-syntax
Open

Fix Dockerfile COPY syntax for multi-file copy#38
dcasota wants to merge 1 commit intovmware:masterfrom
dcasota:fix/dockerfile-copy-syntax

Conversation

@dcasota
Copy link
Copy Markdown

@dcasota dcasota commented Jan 15, 2026

Problem

While building the photon/installer Docker image, the build fails at step 23 with the error:

COPY create-image create-ova create-repo create-azure create-ostree create-cherrypicks-repo create-pkg poi-pkglist yjson /usr/bin
When using COPY with more than one source file, the destination must be a directory and end with a /

Root Cause

The docker/Dockerfile has two issues in the COPY instruction:

  1. poi-pkglist yjson on one line is interpreted as a single argument with a space, but these are two separate files that should each be on their own line
  2. The destination /usr/bin is missing a trailing slash, which is required by Docker when copying multiple files

Fix

  • Split poi-pkglist yjson into two separate lines (poi-pkglist \ and yjson \)
  • Add trailing slash to destination: /usr/bin/

Testing

After applying this fix, the Docker image builds successfully and the Photon OS ISO can be generated.

Reference

- Split 'poi-pkglist yjson' into separate lines (two distinct files)
- Add trailing slash to destination '/usr/bin/' as required by Docker
  when copying multiple files

Without this fix, docker build fails with:
'When using COPY with more than one source file, the destination
must be a directory and end with a /'
dcasota pushed a commit to dcasota/photon-os-installer that referenced this pull request Mar 29, 2026
…om-prod

replace packages-prod.broadcom.com with packages.broadcom.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