Work environment to code from it or remotely (using SSH or openvscode-server).
2.3K
Derived from the excellent openvscode-server image. Also add an openssh-server and most of my tools to work.
I might split this image in 2 later on to have one with my specifics and one more generic for easy reuse by others individuals.
You can find the repository with all the files that were used to generate this image here.
Here are the useful env variables you should be aware of:
| Variable | Default value | Doc |
|---|---|---|
| USER_LOGIN | code | The name your user should have in the env |
| USER_UID | 1000 | The UID your user uses |
| USER_GID | 1000 | The GID your user uses |
| USER_HOME | /home/${USER_LOGIN} | The path to your user's home folder |
| TZ | Update the timezone to use in the env |
Important note: the environment is initialized only once at first start, after that those are ignored
Here are the interesting volumes you might want to bind in the container:
| Container Path | Host Path | Mode | Doc |
|---|---|---|---|
| $USER_HOME | /path/to/your/user/home | rw | The GID your user uses |
| /etc/ssh/keys | /path/to/your/server/ssh/keys | ro/rw | If the folder is empty, it will generate keys there at first boot (needs rw). Otherwise, it will read keys ssh_host_[rsa|ecdsa|ed25519]_key[.pub|] from the folder (ro is okay). |
| /etc/localtime | /etc/localtime | ro | Match the localtime of your host in the VM |
| /var/run/docker.sock | /var/run/docker.sock | ro | (optional) If you want access to your docker env, bind this one |
The ports that you need to handle to access the different services are:
| Container port | Service type | Doc |
|---|---|---|
| 22 | SSH | Access your VM through SSH |
| 3000 | HTTP | Access openvscode-server (note: this route is not secure and you will need to handle authentication with a reverse-proxy or a similar system) |
Content type
Image
Digest
sha256:6b7c02f2c…
Size
616.3 MB
Last updated
almost 2 years ago
docker pull qraynaud/workenv