diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 533a40f..6ebdc55 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -21,14 +21,14 @@ RUN apt-get update \ && apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \ # # Verify git, needed tools installed - && apt-get -y install git iproute2 procps lsb-release \ + && apt-get -y install git openssh-client less iproute2 procps lsb-release \ # # Install lldb, vadimcn.vscode-lldb VSCode extension dependencies && apt-get install -y lldb python3-minimal libpython3.7 \ # # Install Rust components - && rustup update \ - && rustup component add rls rust-analysis rust-src rustfmt clippy \ + && rustup update 2>&1 \ + && rustup component add rls rust-analysis rust-src rustfmt clippy 2>&1 \ # # Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user. && groupadd --gid $USER_GID $USERNAME \ diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6250f96..625e7a3 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,29 +1,27 @@ { - "name": "Rust", + "name": "Rust Sample", "dockerFile": "Dockerfile", "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ], - // Use 'settings' to set *default* container specific settings.json values on container create. - // You can edit these settings after create using File > Preferences > Settings > Remote. + // Set *default* container specific settings.json values on container create. "settings": { "terminal.integrated.shell.linux": "/bin/bash", "lldb.executable": "/usr/bin/lldb" }, - // Use 'appPort' to create a container with published ports. If the port isn't working, be sure - // your server accepts connections from all interfaces (0.0.0.0 or '*'), not just localhost. - // "appPort": [], - - // Uncomment the next line to run commands after the container is created. - // "postCreateCommand": "rustc --version", - - // Comment out the next line to run as root - "remoteUser": "vscode", - - // Add the IDs of extensions you want installed when the container is created in the array below. + // Add the IDs of extensions you want installed when the container is created. "extensions": [ "rust-lang.rust", "bungcip.better-toml", "vadimcn.vscode-lldb" - ] + ], + + // 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", + + // Comment out to run as root instead + "remoteUser": "vscode" } \ No newline at end of file diff --git a/README.md b/README.md index b15ba5b..2a0679b 100644 --- a/README.md +++ b/README.md @@ -10,18 +10,18 @@ Follow these steps to open this sample in a container: 1. If this is your first time using a development container, please follow the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started). -2. To use this repository, you can either open a locally cloned copy of the code: - - - Clone this repository to your local filesystem. - - Press F1 and select the **Remote-Containers: Open Folder in Container...** command. - - Select the cloned copy of this folder, wait for the container to start, and try things out! - - Or open the repository in an isolated Docker volume: +2. To use this repository, you can either open the repository in an isolated Docker volume: - Press F1 and select the **Remote-Containers: Try a Sample...** command. - Choose the "Rust" sample, wait for the container to start and try things out! > **Note:** Under the hood, this will use **Remote-Containers: Open Repository in Container...** command to clone the source code in a Docker volume instead of the local filesystem. + Or open a locally cloned copy of the code: + + - Clone this repository to your local filesystem. + - Press F1 and select the **Remote-Containers: Open Folder in Container...** command. + - Select the cloned copy of this folder, wait for the container to start, and try things out! + ## Things to try Once you have this sample opened in a container, you'll be able to work with it like you would locally.