Skip to content

Commit

Permalink
Fix: Docker build (#3333)
Browse files Browse the repository at this point in the history
# Motivation

docker-build script isn't working.

The problem seems to be when installing ic-wasm with cargo-binstall.

There was a new release of cargo-binstall and this one started breaking
the build script.

In this PR, I install the previous version of cargo-binstall manually
instead of relying in the installer script.

# Changes

* In Dockerfile, install a specific version of cargo-binstall manually.

# Tests

Tested in the gix machine.

# Todos

- [x] Add entry to changelog (if necessary).
  • Loading branch information
lmuntaner authored Sep 19, 2023
1 parent c5114aa commit e99420e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG-Nns-Dapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ The NNS Dapp is released through proposals in the Network Nervous System. Theref

#### Fixed

* Fix build script by pinning cargo-binstall version.

#### Security

## Proposal 124486
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ WORKDIR /
RUN DFX_VERSION="$(cat config/dfx_version)" sh -c "$(curl -fsSL https://sdk.dfinity.org/install.sh)" && dfx --version
# TODO: Make didc support binstall, then use cargo binstall --no-confirm didc here.
RUN set +x && curl -Lf --retry 5 "https://github.com/dfinity/candid/releases/download/$(cat config/didc_version)/didc-linux64" | install -m 755 /dev/stdin "/usr/local/bin/didc" && didc --version
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/181b5293e73cfe16f7a79c5b3a4339bd522d31f3/install-from-binstall-release.sh | bash && cargo binstall -V
RUN curl -L --proto '=https' --tlsv1.2 -sSf "https://github.com/cargo-bins/cargo-binstall/releases/download/v1.3.0/cargo-binstall-x86_64-unknown-linux-musl.tgz" | tar -xvzf -
# Force install of cargo-binstall 1.3.0, latest version 1.3.1 breaks.
RUN ./cargo-binstall -y --force [email protected]
RUN cargo binstall --no-confirm "ic-wasm@$(cat config/ic_wasm_version)" && command -v ic-wasm

# Title: Gets the deployment configuration
Expand Down

0 comments on commit e99420e

Please sign in to comment.