Skip to content

Commit

Permalink
Actually fix dev container
Browse files Browse the repository at this point in the history
  • Loading branch information
xarantolus committed Feb 22, 2024
1 parent 9453b3f commit e257d66
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
22 changes: 16 additions & 6 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
FROM rust:1-buster
FROM ubuntu:22.04

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y curl python3 python3-pip make gcc && \
curl -fsSL https://deb.nodesource.com/setup_21.x | bash - && \
apt-get install -y nodejs
DEBIAN_FRONTEND=noninteractive apt-get install -y curl python3 python3-pip make gcc git pkg-config libssl-dev

RUN rustup component add clippy
RUN curl -fsSL https://deb.nodesource.com/setup_21.x | bash - && \
DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
echo "source $HOME/.cargo/env" >> $HOME/.bashrc

RUN $HOME/.cargo/bin/rustup component add clippy

RUN $HOME/.cargo/bin/rustup target add wasm32-unknown-unknown

RUN . $HOME/.cargo/env && \
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

COPY Makefile /tmp/Makefile
RUN make -j -f /tmp/Makefile dependencies
RUN . $HOME/.cargo/env && \
make -f /tmp/Makefile dependencies
1 change: 0 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
// Increase size of temporary in-memory filesystem for auto-generated binaries by test scripts
"--shm-size=1G"
],
"onCreateCommand": "curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh && echo \"Installing dependencies, this might take a while...\" && make dependencies",
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "rustc --version",
// Configure tool-specific properties.
Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,9 @@ watch-programs:
######################
### Utilities
######################
dependencies: python-dependencies
dependencies:
cargo install cargo-tarpaulin cargo-watch python-launcher

python-dependencies:
$(PY) -m pip install pyperclip tqdm

py -3 -m pip install pyperclip tqdm

clean:
rm -rf $(RM_TARGETS)
Expand Down

0 comments on commit e257d66

Please sign in to comment.