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

Commit

Permalink
Devcontainer: ensure venv is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
Porges authored Sep 9, 2022
1 parent 511eafc commit 6033a00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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

0 comments on commit 6033a00

Please sign in to comment.