Skip to content

[FEATURE REQUEST] Include wasm-tools in official Dockerfile-rust image #1551

@backkem

Description

@backkem

Is your feature request related to a problem?
Current fastly compute build inside Dockerfile-rust occasionally warns:

failed to download latest wasm-tools release: failed to request GitHub metadata: 403 Forbidden

because the CLI tries to fetch wasm-tools from GitHub unauthenticated.

Describe the solution you'd like
Add a cargo install wasm-tools --locked step to the Dockerfile-rust so the binary is already on $PATH.
Example:

  && rustup target add wasm32-wasip1 --toolchain ${RUST_TOOLCHAIN} \
  && apt-get update && apt-get install -y curl jq && apt-get -y clean && rm -rf /var/lib/apt/lists/* \
+ && cargo install wasm-tools --locked \
  && export FASTLY_CLI_VERSION=$(curl -s https://api.github.com/repos/fastly/cli/releases/latest ...

This makes fastly compute build fully offline and removes the 403 noise.

Describe alternatives you've considered

  • Authenticate GitHub API requests via GITHUB_TOKEN (not ideal for a public image)
  • Ignore the warning (works but confusing for new users)

Additional context
Adding wasm-tools increases build time slightly but eliminates the external dependency and makes builds reproducible in CI/CD.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions