ci: Multi-platform build failing due to outdated skopeo in ubuntu-latest
A basic multi-platform build workflow currently fails:
workflow.yml
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- uses: devcontainers/ci@v0.2
with:
imageName: ghcr.io/${{ github.repository }}/devcontainer
platform: linux/amd64,linux/arm64
The error:
Error: Dev container build failed: Command failed: docker tag vsc-repository-d8fa4a8f8a3fefdc0feb211b3b07a31c-features ghcr.io/organization/repository/devcontainer:latest (exit code: undefined)
An error occurred building the container.
Error: Command failed: docker tag vsc-repository-d8fa4a8f8a3fefdc0feb211b3b07a31c-features ghcr.io/organization/repository/devcontainer:latest
Single-platform builds are working fine.
I don’t think this is relevant, but just in case:
.devcontainer/devcontainer.json
{
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers/features/node:1": {}
},
"updateContentCommand": ".devcontainer/install.sh"
}
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 2
- Comments: 20 (1 by maintainers)
Commits related to this issue
- Working around a bug in the devcontainer action. See: https://github.com/devcontainers/ci/issues/191#issuecomment-1603857155 — committed to daytonaio/go-devcontainer by metcalfc 4 months ago
- Working around a bug in the devcontainer action. See: https://github.com/devcontainers/ci/issues/191#issuecomment-1603857155 Signed-off-by: Chad Metcalf <metcalfc@gmail.com> — committed to daytonaio/go-devcontainer by metcalfc 4 months ago
Very nice, that is much cleaner and faster. I can confirm this works for me as well.
Complete working multi-platform build workflow
I have also encountered this
docker tag
error despite having updated theskopeo
package. After several attempts, I found that this issue arises only if yourdevcontainer.json
isimage
based in conjunction withdevcontainer-features
.For example, the following
devcontainer.json
will fail with thedocker tag
error:A temporary workaround is to change your
devcontainer.json
toDockerfile
based. To fix the error:devcontainer.json
toDockerfile
based.Dockerfile
file in the same dir with thedevcontainer.json
fileFollowing advice from https://github.com/containers/skopeo/issues/1874#issuecomment-1541088511, I have got a successful build by setting
BUILDX_NO_DEFAULT_ATTESTATIONS
.Also worth noting I tried to work around this by setting
build.args
to{ "--sbom": "false", "--provenance": "false" }
, but then the post-actionskopeo copy
command failed with fatal errorunsupported MIME type for compression
.So it looks like the only real solution is the Skopeo update, which we’re now doing without issue.
I am happy to confirm that @zydou’s finding is an effective workaround for me as well.
@natescherer Were you hinting at this issue? https://github.com/containers/skopeo/issues/1874 I found it when I googled my error. I found that ubuntu-latest has version
1.4.1
. I applied your update and my issue disappeared.