You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the plugin on a machine with Ubuntu 24.04, I am receiving the following error on upload:
Build of product 'App' complete! (104.98s)
[ContainerImageBuilder] Found base image manifest: sha256:3d417a61bb39f2147c8f8e9ca33885955aa17f7c218bbc33ebe0aaf475041b51
[ContainerImageBuilder] Found base image configuration: sha256:2a486c7915a39ccee40fb774503ed64d3ff95575cbf19b21f82cecc3537b121d
[ContainerImageBuilder]
[ContainerImageBuilder] Built application layer
[ContainerImageBuilder]
[ContainerImageBuilder] Uploading application layer
[ContainerImageBuilder]
[ContainerImageBuilder] E
[ContainerImageBuilder] r
[ContainerImageBuilder] r
[ContainerImageBuilder] o
[ContainerImageBuilder] r: DIGEST_INVALID: provided digest did not match uploaded conten
I also tested the HelloWorldHummingbird example, the issue happens there too. It worked on a macOS Sequoia Machine.
I'm afraid haven't been able to reproduce this problem yet. From the logs it looks like:
The plugin found the swift:slim base image.
It built the application image layer which will be stacked on top of swift:slim.
It failed while it was trying to upload the application image layer. It's hard to tell exactly which sub-step of this upload failed:
First, it uploads the image layer, containing the executable.
Then it uploads the image configuration metadata.
Finally it uploads a manifest object.
It did not get to the stage of uploading the base image layers; this only happens after the application image layer has been uploaded.
Could you please give me some more information?
Could you please re-run your example passing the --verbose flag?
swift package --swift-sdk x86_64-swift-linux-musl build-container-image --verbose --from swift:slim --repository registry.domain.local/hello
Are you running your Ubuntu build on an Ubuntu host/VM, or in an Ubuntu container? If you're running in a publicly available container, can you post the image reference?
In your reproduction notes you say (Optionally) start a registry server on your network with a reverse proxy in front of it.
Which reverse proxy are you using, and how is it configured?
Could you please try the following commands on your Ubuntu machine:
# Check out the plugin repository
git clone https://github.com/apple/swift-container-plugin --branch 0.2.0 && cd swift-container-plugin
# Run the helper tool which packages and uploads the container.
# In this case "README.md" will be used as the payload, so the container image won't be able to run.
# This is just to exercise the digest calculation.
swift run containertool --verbose --repository registry.domain.local/hello --from swift:slim README.md
# Run the helper tool again. This time, do not include a base image. This excludes the problem
swift run containertool --verbose --repository registry.domain.local/hello --from scratch README.md
Description
When using the plugin on a machine with Ubuntu 24.04, I am receiving the following error on upload:
I also tested the HelloWorldHummingbird example, the issue happens there too. It worked on a macOS Sequoia Machine.
The registry I am trying to upload to is an internally hosted version of https://hub.docker.com/_/registry (v2).
Reproduction
(Optionally) start a registry server on your network with a reverse proxy in front of it.
Run the plugin command (using the Examples/HelloWorldHummingbird).
Package versions
Plugin Version: 0.2.0
Expected behavior
I'd expect a successful upload.
Environment
Ubuntu: Ubuntu 24.04.1 LTS
Swift version 6.0.1 (swift-6.0.1-RELEASE)
Target: x86_64-unknown-linux-gnu
Static SDK: swift-6.0.1-RELEASE_static-linux-0.0.1
Additional information
Maybe there is a difference in checksum calculation when running on macOS vs Linux.
Registry Log:
The text was updated successfully, but these errors were encountered: