diff --git a/services/api-db/Dockerfile b/services/api-db/Dockerfile index 93098a7ade..93a572ec1a 100644 --- a/services/api-db/Dockerfile +++ b/services/api-db/Dockerfile @@ -1,24 +1,11 @@ -ARG UPSTREAM_REPO -ARG UPSTREAM_TAG -FROM ${UPSTREAM_REPO:-uselagoon}/mariadb-10.6:${UPSTREAM_TAG:-latest} +FROM bitnami/mysql:8.0.34 ARG LAGOON_VERSION ENV LAGOON_VERSION=$LAGOON_VERSION -USER root -RUN apk add --no-cache openssh-keygen - -COPY ./legacy-migration-scripts/* /legacy-migration-scripts/ -RUN chown -R mysql /legacy-migration-scripts/ \ - && /bin/fix-permissions /legacy-migration-scripts/ - -USER mysql - -ENV MARIADB_DATABASE=infrastructure \ - MARIADB_USER=api \ - MARIADB_PASSWORD=api \ - MARIADB_CHARSET=utf8 \ - MARIADB_COLLATION=utf8_general_ci - -COPY ./rerun_initdb.sh /rerun_initdb.sh -COPY ./legacy_rerun_initdb.sh /legacy_rerun_initdb.sh +ENV ALLOW_EMPTY_PASSWORD=yes \ + MYSQL_USER=api \ + MYSQL_PASSWORD=api \ + MYSQL_DATABASE=infrastructure \ + MYSQL_AUTHENTICATION_PLUGIN=mysql_native_password \ + MYSQL_SQL_MODE=NO_ENGINE_SUBSTITUTION diff --git a/services/api-db/legacy.Dockerfile b/services/api-db/legacy.Dockerfile new file mode 100644 index 0000000000..93098a7ade --- /dev/null +++ b/services/api-db/legacy.Dockerfile @@ -0,0 +1,24 @@ +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/mariadb-10.6:${UPSTREAM_TAG:-latest} + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION + +USER root +RUN apk add --no-cache openssh-keygen + +COPY ./legacy-migration-scripts/* /legacy-migration-scripts/ +RUN chown -R mysql /legacy-migration-scripts/ \ + && /bin/fix-permissions /legacy-migration-scripts/ + +USER mysql + +ENV MARIADB_DATABASE=infrastructure \ + MARIADB_USER=api \ + MARIADB_PASSWORD=api \ + MARIADB_CHARSET=utf8 \ + MARIADB_COLLATION=utf8_general_ci + +COPY ./rerun_initdb.sh /rerun_initdb.sh +COPY ./legacy_rerun_initdb.sh /legacy_rerun_initdb.sh diff --git a/services/keycloak-db/Dockerfile b/services/keycloak-db/Dockerfile index 6f26eb61a3..d96ddaddd5 100644 --- a/services/keycloak-db/Dockerfile +++ b/services/keycloak-db/Dockerfile @@ -1,17 +1,10 @@ -ARG UPSTREAM_REPO -ARG UPSTREAM_TAG -FROM ${UPSTREAM_REPO:-uselagoon}/mariadb-10.6:${UPSTREAM_TAG:-latest} +FROM bitnami/mysql:8.0.34 ARG LAGOON_VERSION ENV LAGOON_VERSION=$LAGOON_VERSION -ENV MARIADB_DATABASE=keycloak \ - MARIADB_USER=keycloak \ - MARIADB_PASSWORD=keycloak \ - MARIADB_CHARSET=utf8 \ - MARIADB_COLLATION=utf8_general_ci - -COPY my_query-cache.cnf /etc/mysql/conf.d/my_query-cache.cnf -USER root -RUN fix-permissions /etc/mysql/conf.d/ -USER mysql +ENV ALLOW_EMPTY_PASSWORD=yes \ + MYSQL_USER=keycloak \ + MYSQL_PASSWORD=keycloak \ + MYSQL_DATABASE=keycloak \ + MYSQL_AUTHENTICATION_PLUGIN=mysql_native_password diff --git a/services/keycloak-db/legacy.Dockerfile b/services/keycloak-db/legacy.Dockerfile new file mode 100644 index 0000000000..6f26eb61a3 --- /dev/null +++ b/services/keycloak-db/legacy.Dockerfile @@ -0,0 +1,17 @@ +ARG UPSTREAM_REPO +ARG UPSTREAM_TAG +FROM ${UPSTREAM_REPO:-uselagoon}/mariadb-10.6:${UPSTREAM_TAG:-latest} + +ARG LAGOON_VERSION +ENV LAGOON_VERSION=$LAGOON_VERSION + +ENV MARIADB_DATABASE=keycloak \ + MARIADB_USER=keycloak \ + MARIADB_PASSWORD=keycloak \ + MARIADB_CHARSET=utf8 \ + MARIADB_COLLATION=utf8_general_ci + +COPY my_query-cache.cnf /etc/mysql/conf.d/my_query-cache.cnf +USER root +RUN fix-permissions /etc/mysql/conf.d/ +USER mysql