Skip to content

c2w v0.8.x fails because embedded Dockerfile clones old ktock/container2wasm repo where release tag is missing #608

Closed

Description

@Donaim

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} /assets

This 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.wasm

This 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/container2wasm

should 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.wasm

Suggested fix

Update the default SOURCE_REPO in the Dockerfile from:

ARG SOURCE_REPO=https://github.com/ktock/container2wasm

to:

ARG SOURCE_REPO=https://github.com/container2wasm/container2wasm

This 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

  1. ktock commented on Jun 17, 2026

    @ktock
    Collaborator

    Thanks for reporting this. I'm working on the fix in #609.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions