Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile #17

Merged
merged 6 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +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 POCKET_IC_PYTHON_VERSION=2.1.0
ENV POCKET_IC_SERVER_VERSION=7.0.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
Expand All @@ -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"
ENV DFX_VERSION=

# Add wasm32-unknown-unknown target
RUN rustup target add wasm32-unknown-unknown
Expand All @@ -32,6 +30,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
23 changes: 6 additions & 17 deletions azle/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 python3

# 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 [email protected] dockerfile-hash)
# Install azle extension
RUN npx [email protected] install-dfx-extension

# Clean apt
RUN apt-get autoremove && apt-get clean
4 changes: 1 addition & 3 deletions slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.1

RUN apt -yq update
RUN apt -yqq install --no-install-recommends curl ca-certificates libunwind-dev git
Expand All @@ -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"
ENV DFX_VERSION=

# Add wasm32-unknown-unknown target
RUN rustup target add wasm32-unknown-unknown
Expand Down