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!")
@@ -66,7 +65,7 @@ Access the WebUI at <your-ip>:8000. For more information, check out [NetBox](htt
66
65
67
66
## Usage
68
67
69
-
Here are some example snippets to help you get started creating a container.
68
+
To help you get started creating a container from this image you can either use docker-compose or the docker cli.
70
69
71
70
### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose))
72
71
@@ -140,12 +139,11 @@ docker run -d \
140
139
-v /path/to/data:/config \
141
140
--restart unless-stopped \
142
141
lscr.io/linuxserver/netbox:latest
143
-
144
142
```
145
143
146
144
## Parameters
147
145
148
-
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.
146
+
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.
149
147
150
148
| Parameter | Function |
151
149
| :----: | --- |
@@ -182,10 +180,10 @@ You can set any environment variable from a file by using a special prepend `FIL
182
180
As an example:
183
181
184
182
```bash
185
-
-e FILE__PASSWORD=/run/secrets/mysecretpassword
183
+
-e FILE__MYVAR=/run/secrets/mysecretvariable
186
184
```
187
185
188
-
Will set the environment variable `PASSWORD` based on the contents of the `/run/secrets/mysecretpassword` file.
186
+
Will set the environment variable `MYVAR` based on the contents of the `/run/secrets/mysecretvariable` file.
189
187
190
188
## Umask for running applications
191
189
@@ -194,15 +192,20 @@ Keep in mind umask is not chmod it subtracts from permissions based on it's valu
194
192
195
193
## User / Group Identifiers
196
194
197
-
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`.
195
+
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`.
198
196
199
197
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
200
198
201
-
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below:
199
+
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id your_user` as below:
@@ -213,12 +216,29 @@ We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to
213
216
214
217
## Support Info
215
218
216
-
* Shell access whilst the container is running: `docker exec -it netbox /bin/bash`
217
-
* To monitor the logs of the container in realtime: `docker logs -f netbox`
218
-
* container version number
219
-
*`docker inspect -f '{{ index .Config.Labels "build_version" }}' netbox`
220
-
* image version number
221
-
*`docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/netbox:latest`
219
+
* Shell access whilst the container is running:
220
+
221
+
```bash
222
+
docker exec -it netbox /bin/bash
223
+
```
224
+
225
+
* To monitor the logs of the container in realtime:
226
+
227
+
```bash
228
+
docker logs -f netbox
229
+
```
230
+
231
+
* Container version number:
232
+
233
+
```bash
234
+
docker inspect -f '{{ index .Config.Labels "build_version" }}' netbox
235
+
```
236
+
237
+
* Image version number:
238
+
239
+
```bash
240
+
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/netbox:latest
241
+
```
222
242
223
243
## Updating Info
224
244
@@ -228,38 +248,83 @@ Below are the instructions for updating containers:
228
248
229
249
### Via Docker Compose
230
250
231
-
* Update all images: `docker-compose pull`
232
-
* or update a single image: `docker-compose pull netbox`
233
-
* Let compose update all containers as necessary: `docker-compose up -d`
234
-
* or update a single container: `docker-compose up -d netbox`
235
-
* You can also remove the old dangling images: `docker image prune`
251
+
* Update images:
252
+
* All images:
253
+
254
+
```bash
255
+
docker-compose pull
256
+
```
257
+
258
+
* Single image:
259
+
260
+
```bash
261
+
docker-compose pull netbox
262
+
```
263
+
264
+
* Update containers:
265
+
* All containers:
266
+
267
+
```bash
268
+
docker-compose up -d
269
+
```
270
+
271
+
* Single container:
272
+
273
+
```bash
274
+
docker-compose up -d netbox
275
+
```
276
+
277
+
* You can also remove the old dangling images:
278
+
279
+
```bash
280
+
docker image prune
281
+
```
236
282
237
283
### Via Docker Run
238
284
239
-
* Update the image: `docker pull lscr.io/linuxserver/netbox:latest`
240
-
* Stop the running container: `docker stop netbox`
241
-
* Delete the container: `docker rm netbox`
285
+
* Update the image:
286
+
287
+
```bash
288
+
docker pull lscr.io/linuxserver/netbox:latest
289
+
```
290
+
291
+
* Stop the running container:
292
+
293
+
```bash
294
+
docker stop netbox
295
+
```
296
+
297
+
* Delete the container:
298
+
299
+
```bash
300
+
docker rm netbox
301
+
```
302
+
242
303
* 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)
243
-
* You can also remove the old dangling images: `docker image prune`
304
+
* You can also remove the old dangling images:
305
+
306
+
```bash
307
+
docker image prune
308
+
```
244
309
245
310
### Via Watchtower auto-updater (only use if you don't remember the original parameters)
246
311
247
312
* Pull the latest image at its tag and replace it with the same env variables in one run:
248
313
249
-
```bash
250
-
docker run --rm \
251
-
-v /var/run/docker.sock:/var/run/docker.sock \
252
-
containrrr/watchtower \
253
-
--run-once netbox
254
-
```
314
+
```bash
315
+
docker run --rm \
316
+
-v /var/run/docker.sock:/var/run/docker.sock \
317
+
containrrr/watchtower \
318
+
--run-once netbox
319
+
```
255
320
256
321
* You can also remove the old dangling images: `docker image prune`
257
322
258
-
**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).
323
+
**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.
327
+
**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