Skip to content

Commit b305d96

Browse files
Bot Updating Templated Files
1 parent 52f93f6 commit b305d96

File tree

4 files changed

+75
-70
lines changed

4 files changed

+75
-70
lines changed

.github/CONTRIBUTING.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
## Readme
2525

2626
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
27-
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-mariadb/edit/master/readme-vars.yml).
27+
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-mariadb/edit/alpine/readme-vars.yml).
2828

2929
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
3030
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io/images/docker-mariadb)
@@ -96,7 +96,7 @@ If you are proposing additional packages to be added, ensure that you added the
9696

9797
### Testing your changes
9898

99-
```
99+
```bash
100100
git clone https://github.com/linuxserver/docker-mariadb.git
101101
cd docker-mariadb
102102
docker build \
@@ -106,15 +106,16 @@ docker build \
106106
```
107107

108108
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
109-
```
109+
110+
```bash
110111
docker run --rm --privileged multiarch/qemu-user-static:register --reset
111112
```
112113

113114
Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`.
114115

115-
## Update the chagelog
116+
## Update the changelog
116117

117-
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-mariadb/tree/master/root), add an entry to the changelog
118+
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-mariadb/tree/alpine/root), add an entry to the changelog
118119

119120
```yml
120121
changelogs:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
------------------------------
2323

24-
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-mariadb/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
24+
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-mariadb/blob/alpine/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
2525

2626
------------------------------
2727

.github/workflows/greetings.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ jobs:
88
steps:
99
- uses: actions/first-interaction@v1
1010
with:
11-
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-mariadb/blob/master/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-mariadb/blob/master/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!'
12-
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-mariadb/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
11+
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-mariadb/blob/alpine/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-mariadb/blob/alpine/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!'
12+
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-mariadb/blob/alpine/.github/PULL_REQUEST_TEMPLATE.md)!'
1313
repo-token: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 66 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- DO NOT EDIT THIS FILE MANUALLY -->
2-
<!-- Please read the CONTRIBUTING.md -->
2+
<!-- Please read the https://github.com/linuxserver/docker-mariadb/blob/alpine/.github/CONTRIBUTING.md -->
33

44
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io)
55

@@ -12,13 +12,14 @@
1212

1313
The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring:
1414

15-
* regular and timely application updates
16-
* easy user mappings (PGID, PUID)
17-
* custom base image with s6 overlay
18-
* weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
19-
* regular security updates
15+
* regular and timely application updates
16+
* easy user mappings (PGID, PUID)
17+
* custom base image with s6 overlay
18+
* weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
19+
* regular security updates
2020

2121
Find us at:
22+
2223
* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more!
2324
* [Discord](https://discord.gg/YWrKVTn) - realtime support / chat with the community and the team.
2425
* [Discourse](https://discourse.linuxserver.io) - post on our community forum.
@@ -39,7 +40,6 @@ Find us at:
3940
[![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Fmariadb%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/mariadb/latest/index.html)
4041

4142
[Mariadb](https://mariadb.org/) is one of the most popular database servers. Made by the original developers of MySQL.
42-
4343
[![mariadb](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/mariadb-git.png)](https://mariadb.org/)
4444

4545
## Supported Architectures
@@ -65,6 +65,50 @@ This image provides various versions that are available via tags. `latest` tag u
6565
| latest | Currently using Ubuntu base images. Will be moved to the Alpine base in the near future. |
6666
| alpine | Releases with an Alpine base. |
6767

68+
## Application Setup
69+
70+
If you didn't set a password during installation, (see logs for warning) use
71+
`mysqladmin -u root password <PASSWORD>`
72+
to set one at the docker prompt...
73+
74+
NOTE changing the MYSQL_ROOT_PASSWORD variable after the container has set up the initial databases has no effect, use the mysqladmin tool to change your mariadb password.
75+
76+
NOTE if you want to use (MYSQL_DATABASE MYSQL_USER MYSQL_PASSWORD) **all three** of these variables need to be set you cannot pick and choose.
77+
78+
Unraid users, it is advisable to edit the template/webui after setup and remove reference to this variable.
79+
80+
Find custom.cnf in /config for config changes (restart container for them to take effect)
81+
, the databases in /config/databases and the log in /config/log/myqsl
82+
83+
### Loading passwords and users from files
84+
85+
The `MYSQL_ROOT_PASSWORD MYSQL_DATABASE MYSQL_USER MYSQL_PASSWORD REMOTE_SQL` env values can be set in a file:
86+
87+
```
88+
/config/env
89+
```
90+
91+
Using the following format:
92+
93+
```
94+
MYSQL_ROOT_PASSWORD="ROOT_ACCESS_PASSWORD"
95+
MYSQL_DATABASE="USER_DB_NAME"
96+
MYSQL_USER="MYSQL_USER"
97+
MYSQL_PASSWORD="DATABASE_PASSWORD"
98+
REMOTE_SQL="http://URL1/your.sql,https://URL2/your.sql"
99+
```
100+
101+
These settings can be mixed and matched with Docker ENV settings as you require, but the settings in the file will always take precedence.
102+
103+
### Bootstrapping a new instance
104+
105+
We support a one time run of custom sql files on init. In order to use this place `*.sql` files in:
106+
107+
```
108+
/config/initdb.d/
109+
```
110+
This will have the same effect as setting the `REMOTE_SQL` environment variable. The sql will only be run on the containers first boot and setup.
111+
68112
## Usage
69113

70114
Here are some example snippets to help you get started creating a container.
@@ -98,7 +142,7 @@ services:
98142
99143
### docker cli
100144
101-
```
145+
```bash
102146
docker run -d \
103147
--name=mariadb \
104148
-e PUID=1000 \
@@ -115,7 +159,6 @@ docker run -d \
115159
ghcr.io/linuxserver/mariadb
116160
```
117161

118-
119162
## Parameters
120163

121164
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.
@@ -139,7 +182,7 @@ You can set any environment variable from a file by using a special prepend `FIL
139182

140183
As an example:
141184

142-
```
185+
```bash
143186
-e FILE__PASSWORD=/run/secrets/mysecretpassword
144187
```
145188

@@ -158,64 +201,17 @@ Ensure any volume directories on the host are owned by the same user you specify
158201

159202
In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below:
160203

161-
```
204+
```bash
162205
$ id username
163206
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
164207
```
165208

166-
167-
&nbsp;
168-
## Application Setup
169-
170-
If you didn't set a password during installation, (see logs for warning) use
171-
`mysqladmin -u root password <PASSWORD>`
172-
to set one at the docker prompt...
173-
174-
NOTE changing the MYSQL_ROOT_PASSWORD variable after the container has set up the initial databases has no effect, use the mysqladmin tool to change your mariadb password.
175-
176-
NOTE if you want to use (MYSQL_DATABASE MYSQL_USER MYSQL_PASSWORD) **all three** of these variables need to be set you cannot pick and choose.
177-
178-
Unraid users, it is advisable to edit the template/webui after setup and remove reference to this variable.
179-
180-
Find custom.cnf in /config for config changes (restart container for them to take effect)
181-
, the databases in /config/databases and the log in /config/log/myqsl
182-
183-
### Loading passwords and users from files
184-
185-
The `MYSQL_ROOT_PASSWORD MYSQL_DATABASE MYSQL_USER MYSQL_PASSWORD REMOTE_SQL` env values can be set in a file:
186-
187-
```
188-
/config/env
189-
```
190-
191-
Using the following format:
192-
193-
```
194-
MYSQL_ROOT_PASSWORD="ROOT_ACCESS_PASSWORD"
195-
MYSQL_DATABASE="USER_DB_NAME"
196-
MYSQL_USER="MYSQL_USER"
197-
MYSQL_PASSWORD="DATABASE_PASSWORD"
198-
REMOTE_SQL="http://URL1/your.sql,https://URL2/your.sql"
199-
```
200-
201-
These settings can be mixed and matched with Docker ENV settings as you require, but the settings in the file will always take precedence.
202-
203-
### Bootstrapping a new instance
204-
205-
We support a one time run of custom sql files on init. In order to use this place `*.sql` files in:
206-
207-
```
208-
/config/initdb.d/
209-
```
210-
This will have the same effect as setting the `REMOTE_SQL` environment variable. The sql will only be run on the containers first boot and setup.
211-
212-
213209
## Docker Mods
210+
214211
[![Docker Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=mariadb&query=%24.mods%5B%27mariadb%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=mariadb "view available mods for this container.") [![Docker Universal Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=universal&query=%24.mods%5B%27universal%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=universal "view available universal mods.")
215212

216213
We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above.
217214

218-
219215
## Support Info
220216

221217
* Shell access whilst the container is running: `docker exec -it mariadb /bin/bash`
@@ -232,38 +228,45 @@ Most of our images are static, versioned, and require an image update and contai
232228
Below are the instructions for updating containers:
233229

234230
### Via Docker Compose
231+
235232
* Update all images: `docker-compose pull`
236233
* or update a single image: `docker-compose pull mariadb`
237234
* Let compose update all containers as necessary: `docker-compose up -d`
238235
* or update a single container: `docker-compose up -d mariadb`
239236
* You can also remove the old dangling images: `docker image prune`
240237

241238
### Via Docker Run
239+
242240
* Update the image: `docker pull ghcr.io/linuxserver/mariadb`
243241
* Stop the running container: `docker stop mariadb`
244242
* Delete the container: `docker rm mariadb`
245243
* 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)
246244
* You can also remove the old dangling images: `docker image prune`
247245

248246
### Via Watchtower auto-updater (only use if you don't remember the original parameters)
247+
249248
* Pull the latest image at its tag and replace it with the same env variables in one run:
250-
```
249+
250+
```bash
251251
docker run --rm \
252252
-v /var/run/docker.sock:/var/run/docker.sock \
253253
containrrr/watchtower \
254254
--run-once mariadb
255255
```
256+
256257
* You can also remove the old dangling images: `docker image prune`
257258

258259
**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).
259260

260261
### Image Update Notifications - Diun (Docker Image Update Notifier)
262+
261263
* We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported.
262264

263265
## Building locally
264266

265267
If you want to make local modifications to these images for development purposes or just to customize the logic:
266-
```
268+
269+
```bash
267270
git clone https://github.com/linuxserver/docker-mariadb.git
268271
cd docker-mariadb
269272
docker build \
@@ -273,7 +276,8 @@ docker build \
273276
```
274277

275278
The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static`
276-
```
279+
280+
```bash
277281
docker run --rm --privileged multiarch/qemu-user-static:register --reset
278282
```
279283

0 commit comments

Comments
 (0)