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

Add basic devcontainer setup

parent b7edabaa
No related branches found
No related tags found
2 merge requests!30Move from develop to master as default branch,!27Add basic devcontainer setup
# The devcontainer will be based on Python
# The base container already has entrypoint, vscode user account, etc. out of the box
FROM mcr.microsoft.com/devcontainers/python:3-bookworm
# containelab version will be set in devcontainer.json
ARG _CLAB_VERSION
# install some basic tools inside the container
# adjust this list based on your demands
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
sshpass \
curl \
iputils-ping \
htop \
&& rm -rf /var/lib/apt/lists/* \
&& rm -Rf /usr/share/doc && rm -Rf /usr/share/man \
&& apt-get clean
# install preferred version of the containerlab
RUN bash -c "$(curl -sL https://get.containerlab.dev)" -- -v ${_CLAB_VERSION} \
&& pip3 install --user yamllint
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "clab-for-arm",
"build": {
"dockerfile": "Dockerfile",
"args": {
"_CLAB_VERSION": "0.46.1"
}
},
"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.0": {
"version": "latest"
},
"ghcr.io/devcontainers/features/go:1": {
"version": "1.21.1"
}
},
// add any required extensions that must be pre-installed in the devcontainer
"customizations": {
"vscode": {
"extensions": [
"ms-azuretools.vscode-docker",
"golang.go",
"EditorConfig.EditorConfig",
"eamodio.gitlens",
"ms-vscode.makefile-tools",
"redhat.vscode-yaml"
]
}
}
}
......@@ -6,7 +6,6 @@ artifacts/
gostructs.go
# non vimmers
.devcontainer/
.vscode/
.idea/
......
......@@ -86,3 +86,12 @@ Our aim is to someday support the following YANG modules (dependencies not liste
These modules were selected based on their probable usefulness in the context of a basic endpoint client (PC running a general purpose OS) with additional modules for future extension on specialized network equipment (switches etc.), and converted into Go structs using ygot and are available for implementation.\
Currently none are fully supported.\
In future versions it will be possible to request the current state of supported modules via the gNMI Capabilities command.
### Devcontainer - local
For this method you only need `docker` and `vscode` with the plugin `Dev Containers` from Microsoft installed.
After you installed the required tools, you can simply open the folder in the dev container.
Either you click on `Open in Container` if a pop-up appears on the bottom right, or by selecting `Open in Container` after clicking on `Remote Explorer` in the left bar in VSCode. Please note: depending on your internet connection and the performance of the device, the initial creation of the container can take several minuts or longer! Furthermore the initial git discovery of every submodule in this repo (if installed) can also take some minutes.
The devcontainer has everything you need in it (even relevant VSCode plugins), so you should not need anything more.
Please keep in mind that this setup is not tested thoroughly!
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment