From abda553b7093062865edff26be051ef5c8bb10b7 Mon Sep 17 00:00:00 2001 From: kyu08 <49891479+kyu08@users.noreply.github.com> Date: Thu, 12 Dec 2024 10:18:25 +0900 Subject: [PATCH] update(dev_container): run commands installing bat when dev container launches (#388) --- .devcontainer/devcontainer.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index f8fff109..1841f19f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ { "name": "Rust", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye" + "image": "mcr.microsoft.com/devcontainers/rust:1-1-bullseye", // Use 'mounts' to make the cargo cache persistent in a Docker Volume. // "mounts": [ @@ -21,7 +21,8 @@ // "forwardPorts": [], // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "rustc --version", + // Workaround for namespace. See: https://github.com/sharkdp/bat?tab=readme-ov-file#on-ubuntu-using-apt + "postCreateCommand": "sudo apt update && sudo apt install -y bat && mkdir -p ~/.local/bin && ln -s /usr/bin/batcat ~/.local/bin/bat" // Configure tool-specific properties. // "customizations": {},