code (sha256:3883144047b46d8b2b3178c49dfd4b3da9e09b8c6a17fead903af9ace823b17a)
Installation
docker pull git.roelc.dev/pixnyb/code@sha256:3883144047b46d8b2b3178c49dfd4b3da9e09b8c6a17fead903af9ace823b17asha256:3883144047b46d8b2b3178c49dfd4b3da9e09b8c6a17fead903af9ace823b17aAbout this package
A Docker image for running Visual Studio Code with various dependencies.
Image layers
| ARG RELEASE |
| ARG LAUNCHPAD_BUILD_ARCH |
| LABEL org.opencontainers.image.version=24.04 |
| ADD file:8ce1caf246e7c778bca84c516d02fd4e83766bb2c530a0fffa8a351b560a2728 in / |
| CMD ["/bin/bash"] |
| LABEL maintainer=Roël Couwenberg <contact@roelc.me> |
| LABEL org.opencontainers.image.title=Dockerised VSCode |
| LABEL org.opencontainers.image.description=A Docker image for running Visual Studio Code with various dependencies. |
| LABEL org.opencontainers.image.url=https://roelc.me/en/resources/2024/05/26/dockerised-vscode |
| LABEL org.opencontainers.image.source=https://github.com/pixnyb/dockerised-vscode |
| RUN /bin/sh -c userdel -r ubuntu || true # buildkit |
| ARG USERNAME=vscode |
| ARG DOCKER=true |
| ARG CODE_INSIDERS |
| ENV DEBIAN_FRONTEND=noninteractive |
| ENV DISPLAY=:0 |
| SHELL [/bin/bash -o pipefail -c] |
| RUN |3 USERNAME=vscode DOCKER=true CODE_INSIDERS= /bin/bash -o pipefail -c apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends apt-utils software-properties-common sudo jq gpg gnupg gnome-keyring wget curl ca-certificates locales msmtp-mta bash-completion libdrm2 libgbm1 libnspr4 libnss3 libxkbfile1 xdg-utils libvulkan1 netcat-openbsd net-tools iputils-ping dnsutils git ssh build-essential python3-minimal unzip zip gh glab vim nano tree tmux silversearcher-ag ripgrep less mandoc htop iotop iftop strace nmap tcpdump openbox rxvt-unicode qutebrowser && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* && locale-gen en_US.UTF-8 && dpkg-reconfigure --frontend=noninteractive locales && update-locale LANG=en_US.UTF-8 # buildkit |
| ENV MAILER_DSN=sendmail://default?command=/usr/sbin/sendmail%20-t |
| ENV LANG=en_US.UTF-8 |
| ENV LANGUAGE=en_US:en |
| ENV LC_ALL=en_US.UTF-8 |
| RUN |3 USERNAME=vscode DOCKER=true CODE_INSIDERS= /bin/bash -o pipefail -c mkdir -p -m 755 /etc/apt/keyrings && wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null && curl -sSL "https://raw.githubusercontent.com/upciti/wakemeops/main/assets/install_repository" | sudo bash # buildkit |
| RUN |3 USERNAME=vscode DOCKER=true CODE_INSIDERS= /bin/bash -o pipefail -c cat > /etc/ssh/sshd_config.d/hardened.conf <<EOF PermitRootLogin no PasswordAuthentication no PermitEmptyPasswords no ChallengeResponseAuthentication no UsePAM yes X11Forwarding yes X11UseLocalhost yes PrintMotd no PrintLastLog no TCPKeepAlive yes PermitUserEnvironment yes ClientAliveInterval 60 ClientAliveCountMax 3 EOF # buildkit |
| RUN |3 USERNAME=vscode DOCKER=true CODE_INSIDERS= /bin/bash -o pipefail -c if [ "$DOCKER" = "true" ]; then curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh && rm get-docker.sh; fi # buildkit |
| RUN |3 USERNAME=vscode DOCKER=true CODE_INSIDERS= /bin/bash -o pipefail -c useradd -m -s /bin/bash ${USERNAME} && echo "${USERNAME} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${USERNAME} && chmod 0440 /etc/sudoers.d/${USERNAME} && usermod -aG docker ${USERNAME} # buildkit |
| RUN |3 USERNAME=vscode DOCKER=true CODE_INSIDERS= /bin/bash -o pipefail -c wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg && install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg && echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list && rm -f packages.microsoft.gpg && apt-get install apt-transport-https -y && apt-get update && apt-get install code${CODE_INSIDERS:+-insiders} -y && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* # buildkit |
| RUN |3 USERNAME=vscode DOCKER=true CODE_INSIDERS= /bin/bash -o pipefail -c if [ -n "${CODE_INSIDERS}" ]; then ln -s /usr/bin/code-insiders /usr/bin/code; echo "Installed Visual Studio Code Insiders"; fi # buildkit |
| RUN |3 USERNAME=vscode DOCKER=true CODE_INSIDERS= /bin/bash -o pipefail -c wget -q -O- https://packagecloud.io/dcommander/turbovnc/gpgkey | gpg --dearmor >/etc/apt/trusted.gpg.d/TurboVNC.gpg && wget -q -O /etc/apt/sources.list.d/turbovnc.list https://raw.githubusercontent.com/TurboVNC/repo/main/TurboVNC.list && apt-get update && apt-get install -y --no-install-recommends turbovnc && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* # buildkit |
| COPY bin/* /usr/local/bin/ # buildkit |
| RUN |3 USERNAME=vscode DOCKER=true CODE_INSIDERS= /bin/bash -o pipefail -c chmod +x /usr/local/bin/* # buildkit |
| RUN |3 USERNAME=vscode DOCKER=true CODE_INSIDERS= /bin/bash -o pipefail -c mkdir -p /home/${USERNAME}/.vscode${CODE_INSIDERS:+-insiders} /home/${USERNAME}/.vscode-server${CODE_INSIDERS:+-insiders} && chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.vscode${CODE_INSIDERS:+-insiders} /home/${USERNAME}/.vscode-server${CODE_INSIDERS:+-insiders} # buildkit |
| RUN |3 USERNAME=vscode DOCKER=true CODE_INSIDERS= /bin/bash -o pipefail -c mkdir -p /etc/home # buildkit |
| RUN |3 USERNAME=vscode DOCKER=true CODE_INSIDERS= /bin/bash -o pipefail -c mkdir -p /home/${USERNAME}/.local/bin && chown -R ${USERNAME}:${USERNAME} /home/${USERNAME} # buildkit |
| USER vscode |
| ENV USER=vscode |
| ENV PATH=/home/vscode/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
| COPY .gitignore .gitmessage .gitconfig /home/vscode # buildkit |
| WORKDIR /home/vscode |
| ENTRYPOINT ["/usr/local/bin/start-vscode.sh"] |
| HEALTHCHECK {Test:[CMD /usr/local/bin/healthcheck-vscode.sh] Interval:15s Timeout:5s StartPeriod:15m0s StartInterval:0s Retries:30} |
| EXPOSE [22/tcp 5900/tcp 8000/tcp] |
| USER root |
| RUN /bin/bash -o pipefail -c curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && rm kubectl # buildkit |
| RUN /bin/bash -o pipefail -c curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-4 && chmod 700 get_helm.sh && ./get_helm.sh && rm get_helm.sh # buildkit |
| RUN /bin/bash -o pipefail -c curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-$(dpkg --print-architecture) && install minikube-linux-$(dpkg --print-architecture) /usr/local/bin/minikube && rm minikube-linux-$(dpkg --print-architecture) # buildkit |
| RUN /bin/bash -o pipefail -c curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash # buildkit |
| ENV GOROOT=/home/vscode/.local/go |
| ENV GOPATH=/home/vscode/go |
| ENV PATH=/home/vscode/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vscode/.local/go/bin:/home/vscode/go/bin |
| RUN /bin/bash -o pipefail -c mkdir -p ${GOROOT} && mkdir -p ${GOPATH}/{bin,pkg,src} # buildkit |
| RUN /bin/bash -o pipefail -c curl -L https://go.dev/dl/$(curl -s https://go.dev/VERSION?m=text | head -n 1).linux-$(dpkg --print-architecture).tar.gz -o go.tar.gz && tar -xf go.tar.gz -C ${GOROOT} --strip-components=1 && rm go.tar.gz && chown -R vscode:vscode ${GOROOT} ${GOPATH} # buildkit |
| RUN /bin/bash -o pipefail -c ARCH=$(dpkg --print-architecture) && if [ "$ARCH" = "amd64" ]; then ARCH="x86_64"; elif [ "$ARCH" = "arm64" ]; then ARCH="aarch64"; fi && curl "https://awscli.amazonaws.com/awscli-exe-linux-$ARCH.zip" -o "awscliv2.zip" && unzip awscliv2.zip && ./aws/install && rm -rf ./aws awscliv2.zip # buildkit |
| RUN /bin/bash -o pipefail -c ARCH=$(dpkg --print-architecture) && if [ "$ARCH" = "amd64" ]; then ARCH="x86_64"; elif [ "$ARCH" = "arm64" ]; then ARCH="arm"; fi && curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-$ARCH.tar.gz && tar -xf google-cloud-cli-linux-$ARCH.tar.gz && mv google-cloud-sdk /usr/local && /usr/local/google-cloud-sdk/install.sh -q --usage-reporting false --path-update true --bash-completion true --rc-path /home/vscode/.bashrc && rm google-cloud-cli-linux-$ARCH.tar.gz # buildkit |
| RUN /bin/bash -o pipefail -c curl -sL https://aka.ms/InstallAzureCLIDeb | bash && az aks install-cli # buildkit |
| COPY bin/cloud/* /usr/local/bin # buildkit |
| RUN /bin/bash -o pipefail -c chmod +x /usr/local/bin/* # buildkit |
| USER vscode |
| RUN /bin/bash -o pipefail -c go install sigs.k8s.io/kind@latest # buildkit |
Labels
| Key | Value |
|---|---|
| maintainer | Roël Couwenberg <contact@roelc.me> |
| org.opencontainers.image.description | A Docker image for running Visual Studio Code with various dependencies. |
| org.opencontainers.image.source | https://github.com/pixnyb/dockerised-vscode |
| org.opencontainers.image.title | Dockerised VSCode |
| org.opencontainers.image.url | https://roelc.me/en/resources/2024/05/26/dockerised-vscode |
| org.opencontainers.image.version | 24.04 |
Details
2026-06-01 06:30:43 +02:00
Versions (22)
View all
Container
0
OCI / Docker
linux/amd64
1.5 GiB