My participation in the Advent of Code for 2020.
Please feel free to browse through my solutions. Be warned that there may be spoilers if you haven't submitted your own answers already.
These instructions are probably over-complicated. docker create
instead of docker run -it
followed by exit
should be possible.
$ docker build -t advent-of-code-2020-rust .
$ docker run -it --name advent-of-code-2020 --mount type=bind,src=$HOME/Projects/advent-of-code/2020,dst=/advent-of-code/2020 advent-of-code-2020-rust
# exit
$ docker start advent-of-code-2020
$ docker exec -it advent-of-code-2020 zsh
#
# cargo build
# cargo test
# cargo run
- Click on the whale icon in the sidebar.
- Right-click on the running container and choose "Attach Visual Studio Code". A new VS Code window will open.
- Click "Open Folder". Navigate to
/advent-of-code/2020
then click "OK". - Install the
rust-lang.rust
extension in the container. If asked to install additional Rust components, click "Yes". - When done, click on "Container advent-of-code-2020" in the bottom-left corner of the window, then choose "Close Remote Connection".