-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-platform build failing due to outdated skopeo in ubuntu-latest #191
Comments
Hi @aaronadamsCA, I suspect that this might be an incompatability between a new version of Docker BuildX and the older version of Skopeo available on the action runner images. Can you try adding this before the build step and see if it works?
|
@natescherer I tried this just now, but the result is the same. |
Could it have something to do with not setting up the push option? |
FWIW, I'm getting the same |
I just got to this issue from a diff skopeo error.
My configs are pretty simple.
I can build a single platform (any of the two) but not both. |
@natescherer Were you hinting at this issue? containers/skopeo#1874 I found it when I googled my error. I found that ubuntu-latest has version |
Correction, the skopeo update did not work after I deleted my container package. Think it only worked because of some caching. Once I deleted my package and tried again with the |
@metaskills - the config we use for the GitHub tests is here, including the skopeo install steps. |
I have also encountered this For example, the following {
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers/features/node:1": {}
}
} A temporary workaround is to change your
{
"build": {
"dockerfile": "./Dockerfile",
"context": "."
},
"features": {
"ghcr.io/devcontainers/features/node:1": {}
}
}
FROM mcr.microsoft.com/devcontainers/base:jammy |
Interesting. Thanks for the investigation @zydou ! Until this is fixed, there's a helpful extension that @bamurtaugh created for converting image-based dev containers to |
I am happy to confirm that @zydou's finding is an effective workaround for me as well. |
Actually, it turns out @natescherer's Skopeo workaround was necessary as well. It looks like we actually have two different issues being tracked here, then:
|
The failure with For the
|
Also worth noting I tried to work around this by setting So it looks like the only real solution is the Skopeo update, which we're now doing without issue. |
@aaronadamsCA - thanks for the follow-up message |
I was able to update the version of Skopeo on an Ubuntu 22.04 GitHub Actions runner with the following:
I find this preferable to the suggestion above by @natescherer as it uses fewer steps and is easier to read. |
Following advice from containers/skopeo#1874 (comment), I have got a successful build by setting - name: Pre-build and push image
uses: devcontainers/ci@v0.3
env:
BUILDX_NO_DEFAULT_ATTESTATIONS: true
with:
imageName: ghcr.io/${{ github.repository }}
cacheFrom: ghcr.io/${{ github.repository }}
platform: linux/amd64,linux/arm64
push: always |
Very nice, that is much cleaner and faster. I can confirm this works for me as well. Complete working multi-platform build workflowon: push
jobs:
devcontainer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.3
- uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: "${{ github.repository_owner }}"
password: "${{ github.token }}"
- uses: docker/setup-qemu-action@v2.2.0
with:
platforms: linux/amd64,linux/arm64
- uses: docker/setup-buildx-action@v2.7.0
- uses: devcontainers/ci@v0.3.1900000329
env:
BUILDX_NO_DEFAULT_ATTESTATIONS: true
with:
cacheFrom: "ghcr.io/${{ github.repository }}/devcontainer"
imageName: "ghcr.io/${{ github.repository }}/devcontainer"
platform: linux/amd64,linux/arm64
refFilterForPush: refs/heads/main
subFolder: .devcontainer |
It appears that |
Adding a fix for the tagging error in #271. I also had to update skopeo to get around the mime type error. Ubuntu 22.04 (the current LTS version) has skopeo 1.4.1, it seems GitHub's |
docker tag
commandSee: devcontainers/ci#191 (comment) Signed-off-by: Chad Metcalf <metcalfc@gmail.com>
I believe this is fixed now without any additional changes when using runs-on: ubuntu-24.04 |
A basic multi-platform build workflow currently fails:
workflow.yml
The error:
Single-platform builds are working fine.
I don't think this is relevant, but just in case:
.devcontainer/devcontainer.json
The text was updated successfully, but these errors were encountered: