@@ -4,10 +4,11 @@ ARG USERNAME=developer
44ARG USER_UID=1000
55ARG USER_GID=$USER_UID
66
7- ARG VERSION_MXPY="v8.1.0"
8- ARG VERSION_RUST="nightly-2023-05-26"
9- ARG VERSION_WASM_OPT="version_112"
10- ARG VERSION_VMTOOLS="v1.4.60"
7+ ARG VERSION_MXPY="v9.4.1"
8+ ARG VERSION_RUST="nightly-2023-12-11"
9+ ARG VERSION_SC_META="0.47.1"
10+ ARG VERSION_WASM_OPT="0.112.0"
11+ ARG VERSION_VMTOOLS="v1.5.24"
1112
1213# Create the user
1314RUN groupadd --gid $USER_GID $USERNAME \
@@ -23,7 +24,7 @@ RUN groupadd --gid $USER_GID $USERNAME \
2324RUN apt-get update && apt-get install -y \
2425 wget \
2526 build-essential \
26- python3.10 python3-pip \
27+ python3.10 python3-pip python3.10-venv \
2728 git \
2829 pkg-config \
2930 libssl-dev && \
@@ -33,28 +34,29 @@ RUN apt-get update && apt-get install -y \
3334USER $USERNAME
3435WORKDIR /home/${USERNAME}
3536
36- # Create "~/multiversx-sdk"
37- ENV MULTIVERSX=/home/${USERNAME}/multiversx-sdk
38- RUN mkdir ${MULTIVERSX}
37+ ENV MULTIVERSX="/home/${USERNAME}/multiversx-sdk"
38+ ENV PATH="/home/${USERNAME}/.local/bin:${PATH}"
39+ ENV PATH="/home/${USERNAME}/.cargo/bin:${PATH}"
40+ ENV PATH="${MULTIVERSX}/vmtools:${PATH}"
41+
42+ # Install pipx
43+ RUN python3 -m pip install --no-cache-dir --user pipx
3944
4045# Install mxpy
41- RUN pip3 install --no-cache-dir https://github.com/multiversx/mx-sdk-py-cli/archive/refs/tags/${VERSION_MXPY}.zip
42- ENV PATH="${MULTIVERSX}:${PATH}"
43- COPY "mxpy" "${MULTIVERSX}/mxpy"
46+ RUN pipx install multiversx-sdk-cli==${VERSION_MXPY}
4447
4548# Install rust and other tools
46- RUN mxpy deps install rust --tag=${VERSION_RUST} && rm -rf ${MULTIVERSX}/vendor-rust/registry/*
47- RUN mxpy deps install wasm-opt --tag=${VERSION_WASM_OPT} && rm ${MULTIVERSX}/*.tar.gz
48- RUN mxpy deps install vmtools --tag=${VERSION_VMTOOLS} && rm ${MULTIVERSX}/*.tar.gz && sudo rm -rf ${MULTIVERSX}/golang
49+ RUN mxpy config set "dependencies.rust.tag" ${VERSION_RUST} && \
50+ mxpy config set "dependencies.sc-meta.tag" ${VERSION_SC_META} && \
51+ mxpy config set "dependencies.wasm-opt.tag" ${VERSION_WASM_OPT} && \
52+ mxpy config set "dependencies.vmtools.tag" ${VERSION_VMTOOLS}
53+ RUN mxpy deps install rust && rm -rf /home/${USERNAME}/.cargo/registry/* && rm -rf /home/${USERNAME}/.cargo/git/*
54+ RUN mxpy deps install vmtools && rm ${MULTIVERSX}/*.tar.gz && sudo rm -rf ${MULTIVERSX}/golang
4955
5056# Install test wallets
5157RUN mxpy deps install testwallets && rm ${MULTIVERSX}/*.tar.gz
5258
53- ENV PATH="${MULTIVERSX}/vendor-rust/bin:${MULTIVERSX}/vmtools:${PATH}"
54- ENV CARGO_HOME="${MULTIVERSX}/vendor-rust"
55- ENV RUSTUP_HOME="${MULTIVERSX}/vendor-rust"
56-
57- RUN rustup component add rustfmt && rm -rf ${MULTIVERSX}/vendor-rust/registry/*
59+ RUN rustup component add rustfmt && rm -rf /home/${USERNAME}/.cargo/registry/* && rm -rf /home/${USERNAME}/.cargo/git/*
5860
5961# This command will be executed once the devcontainer is created
6062COPY "post_create_command.py" "${MULTIVERSX}/devcontainer-resources/"
0 commit comments