code (sha256:9e05a736e742768241db93fe8be5c5b4a8c1a83f2add0036ff68c46cd5d1f8fe)
Installation
docker pull git.roelc.dev/pixnyb/code@sha256:9e05a736e742768241db93fe8be5c5b4a8c1a83f2add0036ff68c46cd5d1f8fesha256:9e05a736e742768241db93fe8be5c5b4a8c1a83f2add0036ff68c46cd5d1f8feAbout 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 |
| RUN /bin/bash -o pipefail -c apt-get update && apt-get install -y openjdk-17-jdk gradle maven ant && sudo rm -rf /var/lib/apt/lists/* # buildkit |
| COPY bin/java/* /usr/local/bin # buildkit |
| RUN /bin/bash -o pipefail -c chmod +x /usr/local/bin/* # buildkit |
| ENV JAVA_VERSION=17 |
| USER vscode |
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 07:16:37 +02:00
Versions (22)
View all
Container
0
OCI / Docker
linux/arm64
1.2 GiB