Skip to content

Commit 31e2f77

Browse files
Bot Updating Templated Files
1 parent b03eace commit 31e2f77

File tree

1 file changed

+100
-35
lines changed

1 file changed

+100
-35
lines changed

README.md

Lines changed: 100 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
<!-- DO NOT EDIT THIS FILE MANUALLY -->
2-
<!-- Please read the https://github.com/linuxserver/docker-code-server/blob/master/.github/CONTRIBUTING.md -->
3-
1+
<!-- DO NOT EDIT THIS FILE MANUALLY -->
2+
<!-- Please read https://github.com/linuxserver/docker-code-server/blob/master/.github/CONTRIBUTING.md -->
43
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io)
54

65
[![Blog](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Blog)](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!")
@@ -81,7 +80,7 @@ How to create the [hashed password](https://github.com/cdr/code-server/blob/mast
8180

8281
## Usage
8382

84-
Here are some example snippets to help you get started creating a container.
83+
To help you get started creating a container from this image you can either use docker-compose or the docker cli.
8584

8685
### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
8786

@@ -127,12 +126,11 @@ docker run -d \
127126
-v /path/to/appdata/config:/config \
128127
--restart unless-stopped \
129128
lscr.io/linuxserver/code-server:latest
130-
131129
```
132130

133131
## Parameters
134132

135-
Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container.
133+
Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container.
136134

137135
| Parameter | Function |
138136
| :----: | --- |
@@ -155,10 +153,10 @@ You can set any environment variable from a file by using a special prepend `FIL
155153
As an example:
156154

157155
```bash
158-
-e FILE__PASSWORD=/run/secrets/mysecretpassword
156+
-e FILE__MYVAR=/run/secrets/mysecretvariable
159157
```
160158

161-
Will set the environment variable `PASSWORD` based on the contents of the `/run/secrets/mysecretpassword` file.
159+
Will set the environment variable `MYVAR` based on the contents of the `/run/secrets/mysecretvariable` file.
162160

163161
## Umask for running applications
164162

@@ -167,15 +165,20 @@ Keep in mind umask is not chmod it subtracts from permissions based on it's valu
167165

168166
## User / Group Identifiers
169167

170-
When using volumes (`-v` flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`.
168+
When using volumes (`-v` flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`.
171169

172170
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
173171

174-
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below:
172+
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id your_user` as below:
175173

176174
```bash
177-
$ id username
178-
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
175+
id your_user
176+
```
177+
178+
Example output:
179+
180+
```text
181+
uid=1000(your_user) gid=1000(your_user) groups=1000(your_user)
179182
```
180183

181184
## Docker Mods
@@ -186,12 +189,29 @@ We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to
186189

187190
## Support Info
188191

189-
* Shell access whilst the container is running: `docker exec -it code-server /bin/bash`
190-
* To monitor the logs of the container in realtime: `docker logs -f code-server`
191-
* container version number
192-
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' code-server`
193-
* image version number
194-
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/code-server:latest`
192+
* Shell access whilst the container is running:
193+
194+
```bash
195+
docker exec -it code-server /bin/bash
196+
```
197+
198+
* To monitor the logs of the container in realtime:
199+
200+
```bash
201+
docker logs -f code-server
202+
```
203+
204+
* Container version number:
205+
206+
```bash
207+
docker inspect -f '{{ index .Config.Labels "build_version" }}' code-server
208+
```
209+
210+
* Image version number:
211+
212+
```bash
213+
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/code-server:latest
214+
```
195215

196216
## Updating Info
197217

@@ -201,38 +221,83 @@ Below are the instructions for updating containers:
201221

202222
### Via Docker Compose
203223

204-
* Update all images: `docker-compose pull`
205-
* or update a single image: `docker-compose pull code-server`
206-
* Let compose update all containers as necessary: `docker-compose up -d`
207-
* or update a single container: `docker-compose up -d code-server`
208-
* You can also remove the old dangling images: `docker image prune`
224+
* Update images:
225+
* All images:
226+
227+
```bash
228+
docker-compose pull
229+
```
230+
231+
* Single image:
232+
233+
```bash
234+
docker-compose pull code-server
235+
```
236+
237+
* Update containers:
238+
* All containers:
239+
240+
```bash
241+
docker-compose up -d
242+
```
243+
244+
* Single container:
245+
246+
```bash
247+
docker-compose up -d code-server
248+
```
249+
250+
* You can also remove the old dangling images:
251+
252+
```bash
253+
docker image prune
254+
```
209255

210256
### Via Docker Run
211257

212-
* Update the image: `docker pull lscr.io/linuxserver/code-server:latest`
213-
* Stop the running container: `docker stop code-server`
214-
* Delete the container: `docker rm code-server`
258+
* Update the image:
259+
260+
```bash
261+
docker pull lscr.io/linuxserver/code-server:latest
262+
```
263+
264+
* Stop the running container:
265+
266+
```bash
267+
docker stop code-server
268+
```
269+
270+
* Delete the container:
271+
272+
```bash
273+
docker rm code-server
274+
```
275+
215276
* Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved)
216-
* You can also remove the old dangling images: `docker image prune`
277+
* You can also remove the old dangling images:
278+
279+
```bash
280+
docker image prune
281+
```
217282

218283
### Via Watchtower auto-updater (only use if you don't remember the original parameters)
219284

220285
* Pull the latest image at its tag and replace it with the same env variables in one run:
221286

222-
```bash
223-
docker run --rm \
224-
-v /var/run/docker.sock:/var/run/docker.sock \
225-
containrrr/watchtower \
226-
--run-once code-server
227-
```
287+
```bash
288+
docker run --rm \
289+
-v /var/run/docker.sock:/var/run/docker.sock \
290+
containrrr/watchtower \
291+
--run-once code-server
292+
```
228293

229294
* You can also remove the old dangling images: `docker image prune`
230295

231-
**Note:** We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using [Docker Compose](https://docs.linuxserver.io/general/docker-compose).
296+
**warning**: We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using [Docker Compose](https://docs.linuxserver.io/general/docker-compose).
232297

233298
### Image Update Notifications - Diun (Docker Image Update Notifier)
234299

235-
* We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
300+
**tip**: We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
236301

237302
## Building locally
238303

0 commit comments

Comments
 (0)