From 3deb31c3bb688f892fea47a36d1cbffa18fc03e8 Mon Sep 17 00:00:00 2001 From: Elias Datler <46360620+fxgst@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:54:04 +0100 Subject: [PATCH 1/6] Update Dockerfile --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2647038..cbb57f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,8 @@ FROM --platform=linux/amd64 rust:1.82-slim-bookworm ENV NVM_DIR=/root/.nvm ENV NVM_VERSION=v0.40.1 ENV NODE_VERSION=22.10.0 -ENV DFX_VERSION=0.24.1 -ENV POCKET_IC_SERVER_VERSION=6.0.0 +ENV DFX_VERSION=0.24.2 +ENV POCKET_IC_SERVER_VERSION=7.0.0 ENV POCKET_IC_PYTHON_VERSION=2.1.0 RUN apt -yq update @@ -20,7 +20,7 @@ RUN . "${NVM_DIR}/nvm.sh" && nvm alias default v${NODE_VERSION} # Install dfx RUN DFXVM_INIT_YES=true sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)" ENV PATH="/root/.local/share/dfx/bin:$PATH" -ENV DFX_VERSION= +RUN unset DFX_VERSION # Add wasm32-unknown-unknown target RUN rustup target add wasm32-unknown-unknown @@ -32,6 +32,7 @@ RUN pip3 install pocket-ic==${POCKET_IC_PYTHON_VERSION} --break-system-packages RUN curl -Ls https://github.com/dfinity/pocketic/releases/download/${POCKET_IC_SERVER_VERSION}/pocket-ic-x86_64-linux.gz -o pocket-ic.gz RUN gzip -d pocket-ic.gz RUN chmod +x pocket-ic +RUN mv pocket-ic /usr/local/bin # Clean apt RUN apt-get autoremove && apt-get clean From b08947cd7dbbbf7546128eda852f92228c6d5f03 Mon Sep 17 00:00:00 2001 From: Elias Datler Date: Fri, 15 Nov 2024 19:39:46 +0100 Subject: [PATCH 2/6] Azle --- azle/Dockerfile | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/azle/Dockerfile b/azle/Dockerfile index 43dab0d..9a6c0cb 100644 --- a/azle/Dockerfile +++ b/azle/Dockerfile @@ -1,25 +1,14 @@ -FROM --platform=linux/amd64 node:20-bookworm-slim +FROM --platform=linux/amd64 node:slim -# Install a basic environment needed for our build tools -RUN apt-get -yq update -RUN apt-get -yqq install --no-install-recommends curl ca-certificates \ - build-essential pkg-config libssl-dev llvm-dev liblmdb-dev clang cmake rsync git \ - libunwind-dev +RUN apt -yq update +RUN apt -yqq install --no-install-recommends curl ca-certificates libunwind-dev git # Install dfx -RUN DFX_VERSION=0.24.1 DFXVM_INIT_YES=true sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)" +RUN DFX_VERSION=0.24.2 DFXVM_INIT_YES=true sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)" ENV PATH="/root/.local/share/dfx/bin:$PATH" -# Dug out from [here](https://github.com/demergent-labs/azle/blob/main/.github/workflows/test.yml#L251) -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.73.0 --profile=minimal -ENV PATH="/root/.cargo/bin:$PATH" -RUN rustup target add wasm32-wasi - -RUN cargo install --git https://github.com/wasm-forge/wasi2ic --rev 806c3558aad24224852a9582f018178402cb3679 - -RUN git clone https://github.com/demergent-labs/wasmedge-quickjs && cd wasmedge-quickjs && git checkout c21ff69f442998e4cda4619166e23a9bc91418be -RUN mkdir -p ${HOME}/.config/azle -RUN mv /wasmedge-quickjs ${HOME}/.config/azle/wasmedge-quickjs_$(npx azle@0.21.1 dockerfile-hash) +# Install azle extension +RUN npx azle@0.24.1 install-dfx-extension # Clean apt RUN apt-get autoremove && apt-get clean From 4ef647ba626ff24afed469090b34396691f55397 Mon Sep 17 00:00:00 2001 From: Elias Datler <46360620+fxgst@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:08:35 +0100 Subject: [PATCH 3/6] Update azle/Dockerfile --- azle/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azle/Dockerfile b/azle/Dockerfile index 9a6c0cb..cdf31e0 100644 --- a/azle/Dockerfile +++ b/azle/Dockerfile @@ -1,7 +1,7 @@ FROM --platform=linux/amd64 node:slim RUN apt -yq update -RUN apt -yqq install --no-install-recommends curl ca-certificates libunwind-dev git +RUN apt -yqq install --no-install-recommends curl ca-certificates libunwind-dev git python3 # Install dfx RUN DFX_VERSION=0.24.2 DFXVM_INIT_YES=true sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)" From 1732c025f048dd01f95ca9fe1465f6cdd46f971f Mon Sep 17 00:00:00 2001 From: Elias Datler Date: Tue, 19 Nov 2024 18:12:14 +0100 Subject: [PATCH 4/6] Update --- Dockerfile | 2 +- slim/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index cbb57f4..b697c2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ ENV NVM_VERSION=v0.40.1 ENV NODE_VERSION=22.10.0 ENV DFX_VERSION=0.24.2 ENV POCKET_IC_SERVER_VERSION=7.0.0 -ENV POCKET_IC_PYTHON_VERSION=2.1.0 +ENV POCKET_IC_PYTHON_VERSION=3.0.0 RUN apt -yq update RUN apt -yqq install --no-install-recommends curl ca-certificates libunwind-dev git python3 python3-pip ssh diff --git a/slim/Dockerfile b/slim/Dockerfile index 2f22f92..67aaef8 100644 --- a/slim/Dockerfile +++ b/slim/Dockerfile @@ -3,7 +3,7 @@ FROM --platform=linux/amd64 rust:1.82-slim-bookworm ENV NVM_DIR=/root/.nvm ENV NVM_VERSION=v0.40.1 ENV NODE_VERSION=22.10.0 -ENV DFX_VERSION=0.24.1 +ENV DFX_VERSION=0.24.2 RUN apt -yq update RUN apt -yqq install --no-install-recommends curl ca-certificates libunwind-dev git From cbe9298d64463a27a850bdc05034f94625e30c96 Mon Sep 17 00:00:00 2001 From: Elias Datler Date: Tue, 19 Nov 2024 20:44:39 +0100 Subject: [PATCH 5/6] Unset --- slim/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slim/Dockerfile b/slim/Dockerfile index 67aaef8..0224917 100644 --- a/slim/Dockerfile +++ b/slim/Dockerfile @@ -21,7 +21,7 @@ RUN npm install -g ic-mops # Install dfx RUN DFXVM_INIT_YES=true sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)" ENV PATH="/root/.local/share/dfx/bin:$PATH" -ENV DFX_VERSION= +RUN unset DFX_VERSION # Add wasm32-unknown-unknown target RUN rustup target add wasm32-unknown-unknown From 72656d84466519cd9fbf1788a192b8310606639d Mon Sep 17 00:00:00 2001 From: Elias Datler Date: Tue, 19 Nov 2024 20:51:32 +0100 Subject: [PATCH 6/6] unset does not work, use only in line env variable --- Dockerfile | 4 +--- slim/Dockerfile | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index b697c2d..6255a55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,6 @@ FROM --platform=linux/amd64 rust:1.82-slim-bookworm ENV NVM_DIR=/root/.nvm ENV NVM_VERSION=v0.40.1 ENV NODE_VERSION=22.10.0 -ENV DFX_VERSION=0.24.2 ENV POCKET_IC_SERVER_VERSION=7.0.0 ENV POCKET_IC_PYTHON_VERSION=3.0.0 @@ -18,9 +17,8 @@ RUN . "${NVM_DIR}/nvm.sh" && nvm use v${NODE_VERSION} RUN . "${NVM_DIR}/nvm.sh" && nvm alias default v${NODE_VERSION} # Install dfx -RUN DFXVM_INIT_YES=true sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)" +RUN DFX_VERSION=0.24.2 DFXVM_INIT_YES=true sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)" ENV PATH="/root/.local/share/dfx/bin:$PATH" -RUN unset DFX_VERSION # Add wasm32-unknown-unknown target RUN rustup target add wasm32-unknown-unknown diff --git a/slim/Dockerfile b/slim/Dockerfile index 0224917..2ae25a7 100644 --- a/slim/Dockerfile +++ b/slim/Dockerfile @@ -3,7 +3,6 @@ FROM --platform=linux/amd64 rust:1.82-slim-bookworm ENV NVM_DIR=/root/.nvm ENV NVM_VERSION=v0.40.1 ENV NODE_VERSION=22.10.0 -ENV DFX_VERSION=0.24.2 RUN apt -yq update RUN apt -yqq install --no-install-recommends curl ca-certificates libunwind-dev git @@ -19,9 +18,8 @@ RUN . "${NVM_DIR}/nvm.sh" && nvm alias default v${NODE_VERSION} RUN npm install -g ic-mops # Install dfx -RUN DFXVM_INIT_YES=true sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)" +RUN DFX_VERSION=0.24.2 DFXVM_INIT_YES=true sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)" ENV PATH="/root/.local/share/dfx/bin:$PATH" -RUN unset DFX_VERSION # Add wasm32-unknown-unknown target RUN rustup target add wasm32-unknown-unknown