You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](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
81
80
82
81
## Usage
83
82
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.
85
84
86
85
### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
87
86
@@ -127,12 +126,11 @@ docker run -d \
127
126
-v /path/to/appdata/config:/config \
128
127
--restart unless-stopped \
129
128
lscr.io/linuxserver/code-server:latest
130
-
131
129
```
132
130
133
131
## Parameters
134
132
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.
136
134
137
135
| Parameter | Function |
138
136
| :----: | --- |
@@ -155,10 +153,10 @@ You can set any environment variable from a file by using a special prepend `FIL
155
153
As an example:
156
154
157
155
```bash
158
-
-e FILE__PASSWORD=/run/secrets/mysecretpassword
156
+
-e FILE__MYVAR=/run/secrets/mysecretvariable
159
157
```
160
158
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.
162
160
163
161
## Umask for running applications
164
162
@@ -167,15 +165,20 @@ Keep in mind umask is not chmod it subtracts from permissions based on it's valu
167
165
168
166
## User / Group Identifiers
169
167
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`.
171
169
172
170
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
173
171
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:
* 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
+
```
217
282
218
283
### Via Watchtower auto-updater (only use if you don't remember the original parameters)
219
284
220
285
* Pull the latest image at its tag and replace it with the same env variables in one run:
221
286
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
+
```
228
293
229
294
* You can also remove the old dangling images: `docker image prune`
230
295
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).
* 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.
0 commit comments