Skip to content

Commit

Permalink
IDX-2803 - Add Rust bazel docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
Enzo Desiage committed Apr 18, 2023
1 parent 878bc1d commit d1bd6f5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"image": "dfinity/ic-build-bazel:526a571034668a8aa9693b9294f9d09545ead14e2e478e26f4df03b5f0025e96",
"image": "dfinity/ic-build-bazel:5abdeaa1eb3b2bde348a4f495659445c096324815803f1e4b73b697fe7900521",
"remoteUser": "ubuntu",
"workspaceMount": "source=${localWorkspaceFolder},target=/ic,type=bind",
"workspaceFolder": "/ic",
Expand Down
4 changes: 2 additions & 2 deletions gitlab-ci/config/00--common--images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
artifacts:
expire_in: 3 days
image:
name: "registry.gitlab.com/dfinity-lab/core/docker/ic-build:526a571034668a8aa9693b9294f9d09545ead14e2e478e26f4df03b5f0025e96"
name: "registry.gitlab.com/dfinity-lab/core/docker/ic-build:5abdeaa1eb3b2bde348a4f495659445c096324815803f1e4b73b697fe7900521"
tags:
- dfinity-ic
variables:
Expand All @@ -14,7 +14,7 @@
artifacts:
expire_in: 3 days
image:
name: "registry.gitlab.com/dfinity-lab/core/docker/ic-build-bazel:526a571034668a8aa9693b9294f9d09545ead14e2e478e26f4df03b5f0025e96"
name: "registry.gitlab.com/dfinity-lab/core/docker/ic-build-bazel:5abdeaa1eb3b2bde348a4f495659445c096324815803f1e4b73b697fe7900521"
tags:
- dfinity-ic
variables:
Expand Down
15 changes: 15 additions & 0 deletions gitlab-ci/container/Dockerfile.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,20 @@ COPY ./files/containers.conf /etc/containers/containers.conf
COPY ./files/docker.sh /usr/bin/docker
COPY ./files/entrypoint.sh /entrypoint.sh

# Install Rust and Cargo in /opt
ENV RUSTUP_HOME=/opt/rustup \
CARGO_TARGET_DIR=/cargo_target \
PATH=/opt/cargo/bin:$PATH

# Add Rust/Cargo support
# rustup uses $CARGO_HOME to figure out where to install itself
ARG rust_version=1.58.1
ENV CARGO_HOME=/opt/cargo
RUN curl --fail https://sh.rustup.rs -sSf \
| sh -s -- -y --default-toolchain ${rust_version}-x86_64-unknown-linux-gnu --no-modify-path && \
rustup default ${rust_version}-x86_64-unknown-linux-gnu && \
rustup target add wasm32-unknown-unknown && \
chown -R ${USER}.${USER} ${RUSTUP_HOME} ${CARGO_HOME}

ENTRYPOINT ["/entrypoint.sh"]
CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion gitlab-ci/container/TAG
Original file line number Diff line number Diff line change
@@ -1 +1 @@
526a571034668a8aa9693b9294f9d09545ead14e2e478e26f4df03b5f0025e96
5abdeaa1eb3b2bde348a4f495659445c096324815803f1e4b73b697fe7900521

0 comments on commit d1bd6f5

Please sign in to comment.