Skip to content

Commit 5a84f9c

Browse files
Bot Updating Templated Files
1 parent 3065752 commit 5a84f9c

File tree

1 file changed

+100
-35
lines changed

1 file changed

+100
-35
lines changed

README.md

+100-35
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-mariadb/blob/master/.github/CONTRIBUTING.md -->
3-
1+
<!-- DO NOT EDIT THIS FILE MANUALLY -->
2+
<!-- Please read https://github.com/linuxserver/docker-mariadb/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!")
@@ -125,7 +124,7 @@ mariadb-upgrade -u root -p<PASSWORD>
125124

126125
## Usage
127126

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

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

@@ -169,12 +168,11 @@ docker run -d \
169168
-v path_to_data:/config \
170169
--restart unless-stopped \
171170
lscr.io/linuxserver/mariadb:latest
172-
173171
```
174172

175173
## Parameters
176174

177-
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.
175+
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.
178176

179177
| Parameter | Function |
180178
| :----: | --- |
@@ -196,10 +194,10 @@ You can set any environment variable from a file by using a special prepend `FIL
196194
As an example:
197195

198196
```bash
199-
-e FILE__PASSWORD=/run/secrets/mysecretpassword
197+
-e FILE__MYVAR=/run/secrets/mysecretvariable
200198
```
201199

202-
Will set the environment variable `PASSWORD` based on the contents of the `/run/secrets/mysecretpassword` file.
200+
Will set the environment variable `MYVAR` based on the contents of the `/run/secrets/mysecretvariable` file.
203201

204202
## Umask for running applications
205203

@@ -208,15 +206,20 @@ Keep in mind umask is not chmod it subtracts from permissions based on it's valu
208206

209207
## User / Group Identifiers
210208

211-
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`.
209+
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`.
212210

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

215-
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below:
213+
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id your_user` as below:
216214

217215
```bash
218-
$ id username
219-
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
216+
id your_user
217+
```
218+
219+
Example output:
220+
221+
```text
222+
uid=1000(your_user) gid=1000(your_user) groups=1000(your_user)
220223
```
221224

222225
## Docker Mods
@@ -227,12 +230,29 @@ We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to
227230

228231
## Support Info
229232

230-
* Shell access whilst the container is running: `docker exec -it mariadb /bin/bash`
231-
* To monitor the logs of the container in realtime: `docker logs -f mariadb`
232-
* container version number
233-
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' mariadb`
234-
* image version number
235-
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/mariadb:latest`
233+
* Shell access whilst the container is running:
234+
235+
```bash
236+
docker exec -it mariadb /bin/bash
237+
```
238+
239+
* To monitor the logs of the container in realtime:
240+
241+
```bash
242+
docker logs -f mariadb
243+
```
244+
245+
* Container version number:
246+
247+
```bash
248+
docker inspect -f '{{ index .Config.Labels "build_version" }}' mariadb
249+
```
250+
251+
* Image version number:
252+
253+
```bash
254+
docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/mariadb:latest
255+
```
236256

237257
## Updating Info
238258

@@ -242,38 +262,83 @@ Below are the instructions for updating containers:
242262

243263
### Via Docker Compose
244264

245-
* Update all images: `docker-compose pull`
246-
* or update a single image: `docker-compose pull mariadb`
247-
* Let compose update all containers as necessary: `docker-compose up -d`
248-
* or update a single container: `docker-compose up -d mariadb`
249-
* You can also remove the old dangling images: `docker image prune`
265+
* Update images:
266+
* All images:
267+
268+
```bash
269+
docker-compose pull
270+
```
271+
272+
* Single image:
273+
274+
```bash
275+
docker-compose pull mariadb
276+
```
277+
278+
* Update containers:
279+
* All containers:
280+
281+
```bash
282+
docker-compose up -d
283+
```
284+
285+
* Single container:
286+
287+
```bash
288+
docker-compose up -d mariadb
289+
```
290+
291+
* You can also remove the old dangling images:
292+
293+
```bash
294+
docker image prune
295+
```
250296

251297
### Via Docker Run
252298

253-
* Update the image: `docker pull lscr.io/linuxserver/mariadb:latest`
254-
* Stop the running container: `docker stop mariadb`
255-
* Delete the container: `docker rm mariadb`
299+
* Update the image:
300+
301+
```bash
302+
docker pull lscr.io/linuxserver/mariadb:latest
303+
```
304+
305+
* Stop the running container:
306+
307+
```bash
308+
docker stop mariadb
309+
```
310+
311+
* Delete the container:
312+
313+
```bash
314+
docker rm mariadb
315+
```
316+
256317
* 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)
257-
* You can also remove the old dangling images: `docker image prune`
318+
* You can also remove the old dangling images:
319+
320+
```bash
321+
docker image prune
322+
```
258323

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

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

263-
```bash
264-
docker run --rm \
265-
-v /var/run/docker.sock:/var/run/docker.sock \
266-
containrrr/watchtower \
267-
--run-once mariadb
268-
```
328+
```bash
329+
docker run --rm \
330+
-v /var/run/docker.sock:/var/run/docker.sock \
331+
containrrr/watchtower \
332+
--run-once mariadb
333+
```
269334

270335
* You can also remove the old dangling images: `docker image prune`
271336

272-
**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).
337+
**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).
273338

274339
### Image Update Notifications - Diun (Docker Image Update Notifier)
275340

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

278343
## Building locally
279344

0 commit comments

Comments
 (0)