code (sha256:748bffb37cdc1e98c12200bfa672822c08c655daf031b02b23836691c3912941)

Published 2026-06-01 06:25:43 +02:00 by pixnyb in pixnyb/code

Installation

docker pull git.roelc.dev/pixnyb/code@sha256:748bffb37cdc1e98c12200bfa672822c08c655daf031b02b23836691c3912941
sha256:748bffb37cdc1e98c12200bfa672822c08c655daf031b02b23836691c3912941

About 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:c98b7645109cdf61ab97492b90629581b1b7cb925b9d58a5787a4aaeb719f2be 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
ENV PATH=/home/vscode/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vscode/.dotnet:/home/vscode/.dotnet/tools
COPY bin/dotnet/* /usr/local/bin # buildkit
RUN /bin/bash -o pipefail -c chmod +x /usr/local/bin/* # buildkit
ENV DOTNET_VERSION=9.0
ENV WITH_NODE=false
USER vscode
RUN /bin/bash -o pipefail -c wget https://dot.net/v1/dotnet-install.sh -O dotnet-install && chmod +x ./dotnet-install && ./dotnet-install --channel 9.0 && ls -l $HOME/.dotnet && dotnet --list-sdks # buildkit
EXPOSE [80/tcp]

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
Container
2026-06-01 06:25:43 +02:00
0
OCI / Docker
linux/arm64
1.2 GiB
Versions (22) View all
jekyll 2026-06-01
java-8 2026-06-01
java-25 2026-06-01
java-17 2026-06-01
java-11 2026-06-01