Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Devcontainer: ensure venv is installed #2372

Merged
merged 1 commit into from
Sep 9, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 4 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
libunwind-dev clang build-essential libssl-dev pkg-config lldb \
bash-completion npm dotnet6 \
python-is-python3 direnv uuid-runtime python3-distutils python3-pip
python-is-python3 direnv uuid-runtime python3-distutils python3-pip python3-venv

# Install Rust:
USER vscode
Expand All @@ -22,5 +22,8 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --defau
COPY install-dependencies.sh .
RUN ./install-dependencies.sh

# Setup direnv for Python stuff:
RUN echo 'eval "$(direnv hook bash)"' >> ~/.bashrc

USER root
RUN rm install-dependencies.sh
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
// 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": "chmod u+x .devcontainer/post-create-script.sh; ./.devcontainer/post-create-script.sh",
// Run as interactive bash shell to pick up .bashrc so that direnv is set up:
"postCreateCommand": "bash -i .devcontainer/post-create-script.sh",
// - ensure all nuget packages are present
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
Expand Down