Repository navigation
Description
When running c2w from a released binary, the generated build can fail in the assets-base stage because the embedded Dockerfile tries to clone:
ARG SOURCE_REPO=https://github.com/ktock/container2wasm
ARG SOURCE_REPO_VERSION=v0.8.3
RUN git clone -b ${SOURCE_REPO_VERSION} ${SOURCE_REPO} /assetsThis now fails with:
fatal: Remote branch v0.8.3 not found in upstream origin
It looks like release tags such as v0.8.3 live under container2wasm/container2wasm, while the embedded Dockerfile still defaults to https://github.com/ktock/container2wasm.
Error
I am seeing this during conversion:
#25 [assets-base 3/3] RUN git clone -b v0.8.3 https://github.com/ktock/container2wasm /assets
#25 0.287 Cloning into '/assets'...
#25 0.740 fatal: Remote branch v0.8.3 not found in upstream origin
#25 ERROR: process "/bin/sh -c git clone -b ${SOURCE_REPO_VERSION} ${SOURCE_REPO} /assets" did not complete successfully: exit code: 128
The full failure is in the assets-base stage, before the rest of the conversion can finish.
Reproduction context
I am running c2w on CI here: https://github.com/cfe-lab/CFEIntact/blob/master/.github/workflows/main.yml#L144
I am using the release binary for container2wasm / c2w v0.8.3.
The command is roughly:
c2w \
--build-arg VM_MEMORY_SIZE_MB=1024 \
ghcr.io/cfe-lab/cfeintact:<version> \
wasm-app/public/cfeintact.wasmThis previously worked, likely because the Docker/BuildKit layer for assets-base was cached. Once the layer had to be rebuilt, the live git clone -b v0.8.3 https://github.com/ktock/container2wasm /assets failed.
Expected behavior
The released c2w binary should be reproducible enough that conversion does not depend on a stale repository path.
Either:
ARG SOURCE_REPO=https://github.com/container2wasm/container2wasmshould be the default, or the release should otherwise ensure that the embedded Dockerfile can fetch the matching release sources.
Workaround
Passing SOURCE_REPO explicitly appears to work around the issue:
c2w \
--build-arg VM_MEMORY_SIZE_MB=1024 \
--build-arg SOURCE_REPO=https://github.com/container2wasm/container2wasm \
--build-arg SOURCE_REPO_VERSION=v0.8.3 \
ghcr.io/cfe-lab/cfeintact:<version> \
wasm-app/public/cfeintact.wasmSuggested fix
Update the default SOURCE_REPO in the Dockerfile from:
ARG SOURCE_REPO=https://github.com/ktock/container2wasmto:
ARG SOURCE_REPO=https://github.com/container2wasm/container2wasmThis probably affects multiple v0.8.x releases, not just v0.8.3, since the default source repo path appears to remain the old one.
Activity
ktock commentedon Jun 17, 2026
Thanks for reporting this. I'm working on the fix in #609.