[info=4986b471337a7f4312652ba4f7a7cb61]
OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/mariadb-image?expand=0&rev=78
This commit is contained in:
parent
e3f8830d36
commit
a9274020e6
10
Dockerfile
10
Dockerfile
@ -14,8 +14,8 @@
|
||||
# You can contact the BCI team via https://github.com/SUSE/bci/discussions
|
||||
|
||||
|
||||
#!BuildTag: opensuse/mariadb:11.2
|
||||
#!BuildTag: opensuse/mariadb:11.2-%RELEASE%
|
||||
#!BuildTag: opensuse/mariadb:11.4
|
||||
#!BuildTag: opensuse/mariadb:11.4-%RELEASE%
|
||||
#!BuildTag: opensuse/mariadb:latest
|
||||
|
||||
FROM opensuse/tumbleweed:latest
|
||||
@ -26,12 +26,12 @@ MAINTAINER openSUSE (https://www.opensuse.org/)
|
||||
# labelprefix=org.opensuse.application.mariadb
|
||||
LABEL org.opencontainers.image.title="openSUSE Tumbleweed MariaDB Server"
|
||||
LABEL org.opencontainers.image.description="MariaDB Server container based on the openSUSE Tumbleweed Base Container Image."
|
||||
LABEL org.opencontainers.image.version="11.2"
|
||||
LABEL org.opencontainers.image.version="11.4"
|
||||
LABEL org.opencontainers.image.url="https://www.opensuse.org"
|
||||
LABEL org.opencontainers.image.created="%BUILDTIME%"
|
||||
LABEL org.opencontainers.image.vendor="openSUSE Project"
|
||||
LABEL org.opencontainers.image.source="%SOURCEURL%"
|
||||
LABEL org.opensuse.reference="registry.opensuse.org/opensuse/mariadb:11.2-%RELEASE%"
|
||||
LABEL org.opensuse.reference="registry.opensuse.org/opensuse/mariadb:11.4-%RELEASE%"
|
||||
LABEL org.openbuildservice.disturl="%DISTURL%"
|
||||
LABEL org.opensuse.lifecycle-url="https://en.opensuse.org/Lifetime"
|
||||
LABEL org.opensuse.release-stage="released"
|
||||
@ -43,7 +43,7 @@ ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
CMD ["mariadbd"]
|
||||
EXPOSE 3306
|
||||
# sanity check that the version from the tag is equal to the version of mariadb-client that we expect
|
||||
RUN set -euo pipefail; [ "$(rpm -q --qf '%{version}' mariadb-client | cut -d '.' -f -2)" = "11.2" ]
|
||||
RUN set -euo pipefail; [ "$(rpm -q --qf '%{version}' mariadb-client | cut -d '.' -f -2)" = "11.4" ]
|
||||
|
||||
RUN set -euo pipefail; mkdir /docker-entrypoint-initdb.d
|
||||
|
||||
|
@ -10,13 +10,13 @@ By default, the image launches MariaDB with the same configuration that comes wi
|
||||
The only environment variable required to start the container is the MariaDB root password.
|
||||
|
||||
```ShellSession
|
||||
$ podman run -it --rm -p 3306:3306 -e MARIADB_ROOT_PASSWORD=my-password registry.opensuse.org/opensuse/mariadb:11.2
|
||||
$ podman run -it --rm -p 3306:3306 -e MARIADB_ROOT_PASSWORD=my-password registry.opensuse.org/opensuse/mariadb:11.4
|
||||
```
|
||||
|
||||
or:
|
||||
|
||||
```ShellSession
|
||||
$ podman run -it --rm -p 3306:3306 -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 registry.opensuse.org/opensuse/mariadb:11.2
|
||||
$ podman run -it --rm -p 3306:3306 -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 registry.opensuse.org/opensuse/mariadb:11.4
|
||||
```
|
||||
|
||||
### Volumes
|
||||
@ -31,7 +31,7 @@ When using the MariaDB image, we recommend one of the following options:
|
||||
To mount a host directory as a volume for your data run the following command:
|
||||
|
||||
```ShellSession
|
||||
$ podman run -it --rm -v /my/own/datadir:/var/lib/mysql:Z -p 3306:3306 -e MARIADB_ROOT_PASSWORD=my-password registry.opensuse.org/opensuse/mariadb:11.2
|
||||
$ podman run -it --rm -v /my/own/datadir:/var/lib/mysql:Z -p 3306:3306 -e MARIADB_ROOT_PASSWORD=my-password registry.opensuse.org/opensuse/mariadb:11.4
|
||||
```
|
||||
|
||||
The `-v /my/own/datadir:/var/lib/mysql:Z` part of the command mounts the `/my/own/datadir` directory from the underlying host system as `/var/lib/mysql` inside the container, where MariaDB will by default write its data files.
|
||||
|
@ -122,6 +122,7 @@ docker_temp_server_start() {
|
||||
"$@" --skip-networking --default-time-zone=SYSTEM --socket="${SOCKET}" --wsrep_on=OFF \
|
||||
--expire-logs-days=0 \
|
||||
--loose-innodb_buffer_pool_load_at_startup=0 \
|
||||
--skip-ssl --ssl-cert='' --ssl-key='' --ssl-ca='' \
|
||||
&
|
||||
declare -g MARIADB_PID
|
||||
MARIADB_PID=$!
|
||||
@ -135,6 +136,7 @@ docker_temp_server_start() {
|
||||
local i
|
||||
for i in {30..0}; do
|
||||
if docker_process_sql "${extraArgs[@]}" --database=mysql \
|
||||
--skip-ssl --skip-ssl-verify-server-cert \
|
||||
<<<'SELECT 1' &> /dev/null; then
|
||||
break
|
||||
fi
|
||||
|
@ -42,6 +42,7 @@ _process_sql()
|
||||
${def['file']:+--defaults-file=${def['file']}} \
|
||||
${def['extra_file']:+--defaults-extra-file=${def['extra_file']}} \
|
||||
${def['group_suffix']:+--defaults-group-suffix=${def['group_suffix']}} \
|
||||
--skip-ssl --skip-ssl-verify-server-cert \
|
||||
-B "$@"
|
||||
}
|
||||
|
||||
@ -62,6 +63,7 @@ connect()
|
||||
${def['file']:+--defaults-file=${def['file']}} \
|
||||
${def['extra_file']:+--defaults-extra-file=${def['extra_file']}} \
|
||||
${def['group_suffix']:+--defaults-group-suffix=${def['group_suffix']}} \
|
||||
--skip-ssl --skip-ssl-verify-server-cert \
|
||||
-h localhost --protocol tcp -e 'select 1' 2>&1 \
|
||||
| grep -qF "Can't connect"
|
||||
local ret=${PIPESTATUS[1]}
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 24 07:10:18 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
- update template for new version
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 18 17:24:16 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user