1
- # -------------------------------------------------------------------------------------------------------------
2
- # Copyright (c) Microsoft Corporation. All rights reserved.
3
- # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
4
- # -------------------------------------------------------------------------------------------------------------
5
-
6
- FROM rust:1.47
7
-
8
- # This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
9
- # property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
10
- # will be updated to match your local UID/GID (when using the dockerFile property).
11
- # See https://aka.ms/vscode-remote/containers/non-root-user for details.
12
- ARG USERNAME=vscode
13
- ARG USER_UID=1000
14
- ARG USER_GID=$USER_UID
1
+ FROM mcr.microsoft.com/vscode/devcontainers/rust:1
15
2
16
3
# Avoid warnings by switching to noninteractive
17
4
ENV DEBIAN_FRONTEND=noninteractive
18
-
19
- # Configure apt and install packages
20
- RUN apt-get update \
21
- && apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \
22
- #
23
- # Verify git, needed tools installed
24
- && apt-get -y install git openssh-client less iproute2 procps lsb-release \
25
- #
26
- # Install lldb, vadimcn.vscode-lldb VSCode extension dependencies
27
- && apt-get install -y lldb python3-minimal libpython3.7 \
28
- #
29
- # Install Rust components
30
- && rustup update 2>&1 \
31
- && rustup component add rls rust-analysis rust-src rustfmt clippy 2>&1 \
32
- #
33
- # Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
34
- && groupadd --gid $USER_GID $USERNAME \
35
- && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
36
- # [Optional] Add sudo support for the non-root user
37
- && apt-get install -y sudo \
38
- && echo $USERNAME ALL=\( root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\
39
- && chmod 0440 /etc/sudoers.d/$USERNAME \
40
- #
41
- # Clean up
42
- && apt-get autoremove -y \
43
- && apt-get clean -y \
44
- && rm -rf /var/lib/apt/lists/*
5
+ RUN rustup update 2>&1 \
6
+ && rustup component add rls rust-analysis rust-src rustfmt clippy 2>&1
45
7
46
8
# Switch back to dialog for any ad-hoc use of apt-get
47
9
ENV DEBIAN_FRONTEND=dialog
0 commit comments