|
| 1 | +# SPDX-License-Identifier: MIT |
| 2 | + |
| 3 | +# Copyright (c) 2023 SUSE LLC |
| 4 | + |
| 5 | +# All modifications and additions to the file contributed by third parties |
| 6 | +# remain the property of their copyright owners, unless otherwise agreed |
| 7 | +# upon. |
| 8 | + |
| 9 | +# The content of THIS FILE IS AUTOGENERATED and should not be manually modified. |
| 10 | +# It is maintained by the BCI team and generated by |
| 11 | +# https://github.com/SUSE/BCI-dockerfile-generator |
| 12 | + |
| 13 | +# Please submit bugfixes or comments via https://bugs.opensuse.org/ |
| 14 | +# You can contact the BCI team via https://github.com/SUSE/bci/discussions |
| 15 | + |
| 16 | + |
| 17 | +#!BuildTag: suse/mariadb:%%mariadb_version%% |
| 18 | +#!BuildTag: suse/mariadb:%%mariadb_version%%-%RELEASE% |
| 19 | +#!BuildTag: suse/mariadb:latest |
| 20 | + |
| 21 | +FROM alp/bci/bci-base:latest |
| 22 | + |
| 23 | +MAINTAINER SUSE LLC (https://www.suse.com/) |
| 24 | + |
| 25 | +# Define labels according to https://en.opensuse.org/Building_derived_containers |
| 26 | +# labelprefix=com.suse.basalt.application.mariadb |
| 27 | +LABEL org.opencontainers.image.title="Basalt Project MariaDB Server" |
| 28 | +LABEL org.opencontainers.image.description="MariaDB Server container based on the SUSE Adaptable Linux Platform (ALP)." |
| 29 | +LABEL org.opencontainers.image.version="%%mariadb_version%%" |
| 30 | +LABEL org.opencontainers.image.url="https://susealp.io/" |
| 31 | +LABEL org.opencontainers.image.created="%BUILDTIME%" |
| 32 | +LABEL org.opencontainers.image.vendor="SUSE LLC" |
| 33 | +LABEL org.opencontainers.image.source="%SOURCEURL%" |
| 34 | +LABEL org.opensuse.reference="registry.suse.com/suse/mariadb:%%mariadb_version%%-%RELEASE%" |
| 35 | +LABEL org.openbuildservice.disturl="%DISTURL%" |
| 36 | +LABEL com.suse.supportlevel="techpreview" |
| 37 | +LABEL com.suse.eula="sle-bci" |
| 38 | +LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle" |
| 39 | +LABEL com.suse.image-type="application" |
| 40 | +LABEL com.suse.release-stage="beta" |
| 41 | +# endlabelprefix |
| 42 | + |
| 43 | +RUN set -euo pipefail; zypper -n in --no-recommends mariadb mariadb-tools gawk timezone util-linux; zypper -n clean; rm -rf /var/log/* |
| 44 | +ENTRYPOINT ["docker-entrypoint.sh"] |
| 45 | +CMD ["mariadbd"] |
| 46 | +EXPOSE 3306 |
| 47 | +RUN set -euo pipefail; mkdir /docker-entrypoint-initdb.d |
| 48 | + |
| 49 | +# docker-entrypoint from https://github.com/MariaDB/mariadb-docker.git |
| 50 | +COPY docker-entrypoint.sh /usr/local/bin/ |
| 51 | +RUN set -euo pipefail; chmod 755 /usr/local/bin/docker-entrypoint.sh |
| 52 | +RUN set -euo pipefail; ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat |
| 53 | + |
| 54 | +RUN set -euo pipefail; sed -i 's#gosu mysql#su mysql -s /bin/bash -m#g' /usr/local/bin/docker-entrypoint.sh |
| 55 | + |
| 56 | +# Ensure all logs goes to stdout |
| 57 | +RUN set -euo pipefail; sed -i 's/^log/#log/g' /etc/my.cnf |
| 58 | + |
| 59 | +# Disable binding to localhost only, doesn't make sense in a container |
| 60 | +RUN set -euo pipefail; sed -i -e 's|^\(bind-address.*\)|#\1|g' /etc/my.cnf |
| 61 | + |
| 62 | +RUN set -euo pipefail; mkdir /run/mysql |
| 63 | + |
| 64 | +VOLUME /var/lib/mysql |
0 commit comments