diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d12d224a27aa8b9ba2850dae75bf64de55869155..9e4fe1ec6c15e9d0285ca1b07019017249feeedd 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,6 +1,5 @@ -# The devcontainer will be based on debian # The base container already has entrypoint, vscode user account, etc. out of the box -FROM mcr.microsoft.com/vscode/devcontainers/base:bookworm +FROM mcr.microsoft.com/vscode/devcontainers/base:ubuntu-22.04 # Containerlab version will be set in devcontainer.json ARG _CLAB_VERSION @@ -33,6 +32,9 @@ RUN apt-get update \ # Install gnmic RUN bash -c "$(curl -sL https://get-gnmic.openconfig.net)" +# Install preferred version of the containerlab +RUN bash -c "$(curl -sL https://get.containerlab.dev)" -- -v ${_CLAB_VERSION} + # Install oh-my-zsh for more terminal features and set it as primary shell ENV SHELL /bin/zsh RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true @@ -40,6 +42,3 @@ RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh - # Set editor RUN echo "export VISUAL='nano'" >> /home/vscode/.zshrc RUN echo "export EDITOR='nano'" >> /home/vscode/.zshrc - -# Install preferred version of the containerlab -RUN bash -c "$(curl -sL https://get.containerlab.dev)" -- -v ${_CLAB_VERSION} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 81224c6c3b0345ad6ad6b93a8988cf127051ac61..e83e2f26ba026639dcbb7fe187325e1cb393211c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -11,8 +11,9 @@ "features": { // Containerlab will run in a docker-in-docker container // It is also possible to use docker-outside-docker feature - "ghcr.io/devcontainers/features/docker-in-docker:2.7": { - "version": "latest" + "ghcr.io/devcontainers/features/docker-in-docker:2": { + "version": "latest", + "dockerDashComposeVersion": "v2" }, "ghcr.io/devcontainers/features/go:1": { "version": "1.21" diff --git a/README.md b/README.md index 4a4fd16dc78dd8880ef5a91c25fe669344256d76..479cd5e7377387f533413b2d75121053fd750784 100644 --- a/README.md +++ b/README.md @@ -244,6 +244,9 @@ The volume also means, that caches for things like `golang-ci lint` are persiste Furthermore, the folder `/root/docker` is a persistent volume, so that `docker login` credentials for root (used by containerlab) are also persistent. +For some changes to the dev container setup, mainly changes where the config lays in volumes later, the changes can only be applied if all volumes get deleted beforehand. +So if some things do not work in your dev container, maybe you missed an update. In that case stop the dev container, delete all volumes of this project and *rebuild* (not restart!) the container. + ### Dev container - remote