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 Rust images to use default rustup profile #960

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion src/rust/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [Choice] Debian OS version (use bookworm, or bullseye on local arm64/Apple Silicon): bookworm, buster, bullseye
ARG VARIANT="bookworm"
FROM rust:1-${VARIANT}
FROM buildpack-deps:${VARIANT}
sgdxbc marked this conversation as resolved.
Show resolved Hide resolved

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# Remove imagemagick due to https://security-tracker.debian.org/tracker/CVE-2019-10131
Expand Down
19 changes: 11 additions & 8 deletions src/rust/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,22 @@
"userGid": "1000",
"upgradePackages": "true"
},
"ghcr.io/devcontainers/features/rust:1": "latest",
"ghcr.io/devcontainers/features/git:1": {
"ghcr.io/devcontainers/features/rust:1": {
"version": "latest",
Copy link
Member

@samruddhikhandale samruddhikhandale Feb 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would need to pin this to v1.

Currently, rust is publishing major version 1, so we would need to pin it.

FROM rust:1-${VARIANT}

This ^ was previously ensuring it, else when v2 releases, the build tool will incorrectly tag it to mcr.microsoft.com/devcontainers/rust:1-1

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I don't quiet get it. Do you mean we need to pin feature dependency to v1, or we need to simulate the effect of originally pinning base image to rust:1, or we need to pin this devcontainer image itself to v1?

"profile": "default"
},
"ghcr.io/devcontainers/features/git:1": {
"version": "latest",
"ppa": "false"
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "rustc --version",
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "rustc --version",

// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
Loading