Skip to content
Snippets Groups Projects
Commit aa20811a authored by Neil-Jocelyn Schark's avatar Neil-Jocelyn Schark
Browse files

Fix arm dev containers with did

See merge request !650
parent 09c03571
No related branches found
No related tags found
1 merge request!650Fix arm dev containers with did
Pipeline #179830 passed
# The devcontainer will be based on debian
# The base container already has entrypoint, vscode user account, etc. out of the box # 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 # Containerlab version will be set in devcontainer.json
ARG _CLAB_VERSION ARG _CLAB_VERSION
...@@ -33,6 +32,9 @@ RUN apt-get update \ ...@@ -33,6 +32,9 @@ RUN apt-get update \
# Install gnmic # Install gnmic
RUN bash -c "$(curl -sL https://get-gnmic.openconfig.net)" 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 # Install oh-my-zsh for more terminal features and set it as primary shell
ENV SHELL /bin/zsh ENV SHELL /bin/zsh
RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true 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 - ...@@ -40,6 +42,3 @@ RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -
# Set editor # Set editor
RUN echo "export VISUAL='nano'" >> /home/vscode/.zshrc RUN echo "export VISUAL='nano'" >> /home/vscode/.zshrc
RUN echo "export EDITOR='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}
...@@ -11,8 +11,9 @@ ...@@ -11,8 +11,9 @@
"features": { "features": {
// Containerlab will run in a docker-in-docker container // Containerlab will run in a docker-in-docker container
// It is also possible to use docker-outside-docker feature // It is also possible to use docker-outside-docker feature
"ghcr.io/devcontainers/features/docker-in-docker:2.7": { "ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "latest" "version": "latest",
"dockerDashComposeVersion": "v2"
}, },
"ghcr.io/devcontainers/features/go:1": { "ghcr.io/devcontainers/features/go:1": {
"version": "1.21" "version": "1.21"
......
...@@ -244,6 +244,9 @@ The volume also means, that caches for things like `golang-ci lint` are persiste ...@@ -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. 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 ### Dev container - remote
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment