Skip to content

Commit ccca4aa

Browse files
authored
devcontainer: Install pre-commit using pipx (#704)
2 parents 7390326 + 6bf6eb9 commit ccca4aa

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.devcontainer/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
FROM mcr.microsoft.com/devcontainers/rust:1
44

55
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
6-
&& apt-get -y install --no-install-recommends lld python3-pip \
6+
&& apt-get -y install --no-install-recommends lld pipx \
7+
&& pipx install pre-commit \
78
&& rustup update \
89
&& rustup toolchain install nightly --profile minimal --component clippy,rustfmt
910
COPY config /root/.cargo/config

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
],
2222

2323
// Use 'postCreateCommand' to run commands after the container is created.
24-
"postCreateCommand": "pip install --user --upgrade pre-commit && pre-commit install --install-hooks",
24+
"postCreateCommand": "pre-commit install --install-hooks",
2525

2626
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
2727
"remoteUser": "root",

0 commit comments

Comments
 (0)