Skip to content
Snippets Groups Projects
Dockerfile 1.23 KiB
Newer Older
  • Learn to ignore specific revisions
  • Malte Bauch's avatar
    Malte Bauch committed
    # The base container already has entrypoint, vscode user account, etc. out of the box
    
    FROM mcr.microsoft.com/vscode/devcontainers/base:ubuntu-22.04
    
    Malte Bauch's avatar
    Malte Bauch committed
    
    
    # Containerlab version will be set in devcontainer.json
    ARG _CLAB_VERSION
    
    
    Malte Bauch's avatar
    Malte Bauch committed
    # Set permissions for mounts in devcontainer.json
    RUN mkdir -p /home/vscode/.vscode-server/bin
    RUN chown -R vscode:vscode /home/vscode/.vscode-server
    
    # Update and install some basic tools inside the container
    # Adjust this list based on your demands
    RUN apt-get update \
        && apt-get upgrade -y \
    
        && apt-get install -y \
    
    Malte Bauch's avatar
    Malte Bauch committed
        sshpass \
        curl \
    
        wget \
        openssl \
    
    Malte Bauch's avatar
    Malte Bauch committed
        iputils-ping \
    
    Malte Bauch's avatar
    Malte Bauch committed
        htop \
        nano \
        vim \
        tmux \
        nload \
        yamllint \
    
    Malte Bauch's avatar
    Malte Bauch committed
        && apt-get clean
    
    
    # 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}
    
    
    Malte Bauch's avatar
    Malte Bauch committed
    # Install oh-my-zsh for more terminal features and set is as primary shell
    ENV SHELL /bin/zsh
    RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true
    
    # Set editor
    RUN echo "export VISUAL='nano'" >> /home/vscode/.zshrc
    RUN echo "export EDITOR='nano'" >> /home/vscode/.zshrc