Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: igecloudsdev/vscode-docker
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: ahmadnassri/docker-vscode-server
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 12 commits
  • 10 files changed
  • 1 contributor

Commits on Nov 18, 2024

  1. fix(docker): use cli build for a working web server

    BREAKING CHANGE: new method of installing vscode
    ahmadnassri committed Nov 18, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    ahmadnassri Ahmad Nassri
    Copy the full SHA
    0ab0e2d View commit details
  2. fix: include cli-data-dir for improved caching of server setup

    also user-data-dir is not a workspace directory
    ahmadnassri committed Nov 18, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    ahmadnassri Ahmad Nassri
    Copy the full SHA
    2027ef8 View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    ahmadnassri Ahmad Nassri
    Copy the full SHA
    7367ab2 View commit details
  4. Verified

    This commit was signed with the committer’s verified signature.
    ahmadnassri Ahmad Nassri
    Copy the full SHA
    53b7a8f View commit details
  5. docs: update readme

    ahmadnassri committed Nov 18, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    ahmadnassri Ahmad Nassri
    Copy the full SHA
    505f00e View commit details
  6. Verified

    This commit was signed with the committer’s verified signature.
    ahmadnassri Ahmad Nassri
    Copy the full SHA
    ac41b73 View commit details
  7. docs: update readme

    ahmadnassri committed Nov 18, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    ahmadnassri Ahmad Nassri
    Copy the full SHA
    cedf108 View commit details

Commits on Jan 7, 2025

  1. Verified

    This commit was signed with the committer’s verified signature.
    ahmadnassri Ahmad Nassri
    Copy the full SHA
    7e93912 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    ahmadnassri Ahmad Nassri
    Copy the full SHA
    7f1b3fb View commit details
  3. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    4fe99cd View commit details

Commits on Feb 19, 2025

  1. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    ccba41c View commit details

Commits on Mar 4, 2025

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    093bf4c View commit details
Showing with 43 additions and 96 deletions.
  1. +8 −0 .github/docker-config.json
  2. +0 −8 .github/matrix-publish.json
  3. +21 −15 Dockerfile
  4. +6 −18 README.md
  5. +5 −14 docs/README.md
  6. +3 −16 docs/README.template
  7. +0 −3 src/init
  8. +0 −7 src/serve-local
  9. +0 −6 src/serve-remote
  10. +0 −9 src/start-vscode
8 changes: 8 additions & 0 deletions .github/docker-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "vscode-server",
"platforms": "linux/amd64,linux/arm64",
"registries": [
"ghcr.io",
"docker.io"
]
}
8 changes: 0 additions & 8 deletions .github/matrix-publish.json

This file was deleted.

36 changes: 21 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
# kics-scan disable=67fd0c4a-68cf-46d7-8c41-bc9fba7e40ae,965a08d7-ef86-4f14-8792-4a3b2098937e

FROM ubuntu:23.10
FROM ubuntu:24.04

# hadolint ignore=DL3008
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && apt-get install -y --no-install-recommends \
# support env timezones
tzdata \
# vscode requirements
gnome-keyring wget curl python3-minimal ca-certificates \
# development tools
git build-essential \
# tools & required packages
git curl wget ca-certificates \
# clean up
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*

# install vscode-server
# hadolint ignore=DL4006
RUN wget -q -O- https://aka.ms/install-vscode-server/setup.sh | sh
ARG VERSION="1.97.2"

# copy scripts
COPY src/* /usr/local/bin/
# install visual studio code
RUN <<EOF
ARCH="$(dpkg --print-architecture)";

echo "ARCH: $ARCH";

case "$ARCH" in
amd64) export TARGET='cli-linux-x64' ;;
arm64) export TARGET='cli-linux-arm64' ;;
esac;

wget -qO- https://update.code.visualstudio.com/${VERSION}/${TARGET}/stable | tar xvz -C /usr/bin/
chmod +x /usr/bin/code
EOF

# entrypoint
ENTRYPOINT [ "start-vscode" ]
ENTRYPOINT [ "code", "serve-web", "--without-connection-token", "--accept-server-license-terms" ]

# hadolint ignore=DL3002
USER root
# default arguments
CMD [ "--host", "0.0.0.0", "--port", "8000", "--cli-data-dir", "/root/.vscode/cli-data", "--user-data-dir", "/root/.vscode/user-data", "--server-data-dir", "/root/.vscode/server-data", "--extensions-dir", "/root/.vscode/extensions" ]

HEALTHCHECK NONE

24 changes: 6 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -8,21 +8,16 @@ a Docker image for VS Code Server
[![docker][docker-img]][docker-url]
[![github][github-img]][github-url]

The Visual Studio Code Server is a service you can run on a remote development machine, like your desktop PC or a virtual machine (VM). It allows you to securely connect to that remote machine from anywhere through a vscode.dev URL, without the requirement of SSH.

This is simply a containerized version of the VS Code Server.

Learn more on [the official documentation][]

## Features

<!-- markdownlint-capture -->

<!-- markdownlint-disable MD007 MD030 -->

- Runs entirely locally, without needing `vscode.dev`
- TODO: pending resolution of [issue \#7018][] to support `vscode.dev`
- Persistent secrets *(requirement for Settings Sync)*
- Runs entirely locally, without needing `vscode.dev`
- Persistent secrets *(requirement for Settings Sync)*

<!-- markdownlint-restore -->

@@ -33,20 +28,13 @@ docker run --rm \
--name vscode-server \
--hostname vscode \
-p 8000:8000 \
-e VSCODE_KEYRING_PASS="mysecretpassword" \
-e VSCODE_SERVE_MODE=serve-local \
-v /<host_folder_data>:/root/.vscode-server \
-v ./server-data:/root/.vscode/server-data \
-v ./user-data:/root/.vscode/user-data \
-v ./cli-data:/root/.vscode/cli-data \
-v ./extensions:/root/.vscode/extensions \
ahmadnassri/vscode-server:latest
```

Optionally, you can specify an init script that could be used to install additional software adding the following mount:
```bash
-v /<init_script_path>:/usr/local/bin/init
```

[the official documentation]: https://code.visualstudio.com/docs/remote/vscode-server
[issue \#7018]: https://github.com/microsoft/vscode-remote-release/issues/7018

----
> Author: [Ahmad Nassri](https://www.ahmadnassri.com/) &bull;
> Twitter: [@AhmadNassri](https://twitter.com/AhmadNassri)
19 changes: 5 additions & 14 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@

The Visual Studio Code Server is a service you can run on a remote development machine, like your desktop PC or a virtual machine (VM). It allows you to securely connect to that remote machine from anywhere through a vscode.dev URL, without the requirement of SSH.

This is simply a containerized version of the VS Code Server.

Learn more on [the official documentation](https://code.visualstudio.com/docs/remote/vscode-server)

## Features

<!-- markdownlint-capture -->
<!-- markdownlint-disable MD007 MD030 -->

- Runs entirely locally, without needing `vscode.dev`
- TODO: pending resolution of [issue #7018](https://github.com/microsoft/vscode-remote-release/issues/7018) to support `vscode.dev`
- Persistent secrets _(requirement for Settings Sync)_
<!-- markdownlint-restore -->

@@ -21,13 +16,9 @@ docker run --rm \
--name vscode-server \
--hostname vscode \
-p 8000:8000 \
-e VSCODE_KEYRING_PASS="mysecretpassword" \
-e VSCODE_SERVE_MODE=serve-local \
-v /<host_folder_data>:/root/.vscode-server \
-v ./server-data:/root/.vscode/server-data \
-v ./user-data:/root/.vscode/user-data \
-v ./cli-data:/root/.vscode/cli-data \
-v ./extensions:/root/.vscode/extensions \
ahmadnassri/vscode-server:latest
```

Optionally, you can specify an init script that could be used to install additional software adding the following mount:
```bash
-v /<init_script_path>:/usr/local/bin/init
```
19 changes: 3 additions & 16 deletions docs/README.template
Original file line number Diff line number Diff line change
@@ -4,27 +4,14 @@ $about.description$

[![license][license-img]][license-url]
[![release][release-img]][release-url]
[![size][size-img]][size-url]
[![docker][docker-img]][docker-url]
[![github][github-img]][github-url]

$body$

----
> Author: [Ahmad Nassri](https://www.ahmadnassri.com/) &bull;
> Twitter: [@AhmadNassri](https://twitter.com/AhmadNassri)
---

> Author: [Ahmad Nassri](https://www.ahmadnassri.com/)

[license-url]: LICENSE
[license-img]: https://badgen.net/github/license/$about.repository$

[release-url]: https://github.com/$about.repository$/releases
[release-img]: https://badgen.net/github/release/$about.repository$

[size-url]: https://hub.docker.com/r/ahmadnassri/$id$
[size-img]: https://badgen.net/docker/size/ahmadnassri/$id$?label=image%20size

[docker-url]: https://hub.docker.com/r/ahmadnassri/$id$
[docker-img]: https://badgen.net/badge/icon/docker%20hub?icon=docker&label

[github-url]: https://github.com/users/ahmadnassri/packages/container/package/$id$
[github-img]: https://badgen.net/badge/icon/github%20registry?icon=github&label
3 changes: 0 additions & 3 deletions src/init

This file was deleted.

7 changes: 0 additions & 7 deletions src/serve-local

This file was deleted.

6 changes: 0 additions & 6 deletions src/serve-remote

This file was deleted.

9 changes: 0 additions & 9 deletions src/start-vscode

This file was deleted.