5.7.22-ol-7-r0 release

Maintenance release
This commit is contained in:
Bitnami Bot
2018-06-22 11:41:28 +00:00
parent 9e3e4ca10b
commit 0ad717422c
6 changed files with 128 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
FROM bitnami/oraclelinux-extras:7-r14
LABEL maintainer "Bitnami <containers@bitnami.com>"
# Install required system packages and dependencies
RUN install_packages cyrus-sasl-lib glibc keyutils-libs krb5-libs libaio libcom_err libgcc libselinux libstdc++ ncurses-libs nss-softokn-freebl pcre
RUN bitnami-pkg unpack mysql-5.7.22-1 --checksum b03955eb9a5f36d9e6ae8dcdef41f42b1fff82f62f8c6be83581aaacc5f5ee47
COPY rootfs /
ENV ALLOW_EMPTY_PASSWORD="no" \
BITNAMI_APP_NAME="mysql" \
BITNAMI_IMAGE_VERSION="5.7.22-ol-7-r0" \
MYSQL_DATABASE="" \
MYSQL_MASTER_HOST="" \
MYSQL_MASTER_PORT_NUMBER="" \
MYSQL_MASTER_ROOT_PASSWORD="" \
MYSQL_MASTER_ROOT_USER="" \
MYSQL_PASSWORD="" \
MYSQL_PORT_NUMBER="3306" \
MYSQL_REPLICATION_MODE="" \
MYSQL_REPLICATION_PASSWORD="" \
MYSQL_REPLICATION_USER="" \
MYSQL_ROOT_PASSWORD="" \
MYSQL_ROOT_USER="root" \
MYSQL_USER="" \
PATH="/opt/bitnami/mysql/bin:$PATH"
EXPOSE 3306
ENTRYPOINT ["/app-entrypoint.sh"]
CMD ["nami","start","--foreground","mysql"]

View File

@@ -0,0 +1,16 @@
version: '2'
services:
mysql:
image: 'bitnami/mysql:5.7-ol-7'
ports:
- '3306:3306'
volumes:
- 'mysql_data:/bitnami'
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=yes
volumes:
mysql_data:
driver: local

View File

@@ -0,0 +1,14 @@
#!/bin/bash -e
. /opt/bitnami/base/functions
. /opt/bitnami/base/helpers
print_welcome_page
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/init.sh" ]]; then
. /init.sh
nami_initialize mysql
info "Starting mysql... "
fi
exec tini -- "$@"

View File

@@ -0,0 +1,51 @@
##
## @brief Helper function to show an error when a password is empty and exit
## param $1 Input name
##
empty_password_error() {
error "The $1 environment variable is empty or not set. Set the environment variable ALLOW_EMPTY_PASSWORD=yes to allow the container to be started with blank passwords. This is recommended only for development."
exit 1
}
##
## @brief Helper function to show a warning when the ALLOW_EMPTY_PASSWORD flag is enabled
##
empty_password_enabled_warn() {
warn "You set the environment variable ALLOW_EMPTY_PASSWORD=${ALLOW_EMPTY_PASSWORD}. For safety reasons, do not use this flag in a production environment."
}
##
## @brief Helper function to check deprecated environment variables and warn about them
## param $1 Deprecated environment variable to check
## param $2 Suggested environment variable to use
##
check_for_deprecated_env() {
if [[ -n "${!1}" ]]; then
warn "The environment variable $1 is deprecated and will be removed in a future. Please use $2 instead"
fi
}
# Check env vars to deprecate
check_for_deprecated_env "MYSQL_MASTER_USER" "MYSQL_MASTER_ROOT_USER"
export MYSQL_MASTER_ROOT_USER=${MYSQL_MASTER_USER:-${MYSQL_MASTER_ROOT_USER}}
check_for_deprecated_env "MYSQL_MASTER_PASSWORD" "MYSQL_MASTER_ROOT_PASSWORD"
export MYSQL_MASTER_ROOT_PASSWORD=${MYSQL_MASTER_PASSWORD:-${MYSQL_MASTER_ROOT_PASSWORD}}
# Validate passwords
if [[ "$ALLOW_EMPTY_PASSWORD" =~ ^(yes|Yes|YES)$ ]]; then
empty_password_enabled_warn
elif [[ "$MYSQL_REPLICATION_MODE" != "slave" ]]; then
# Root user
if [[ -z "$MYSQL_ROOT_PASSWORD" ]]; then
empty_password_error MYSQL_ROOT_PASSWORD
fi
# Replication user
if [[ -n "$MYSQL_REPLICATION_USER" && -z "$MYSQL_REPLICATION_PASSWORD" ]]; then
empty_password_error MYSQL_REPLICATION_PASSWORD
fi
# Additional user creation
if [[ -n "$MYSQL_USER" && -z "$MYSQL_PASSWORD" ]]; then
empty_password_error MYSQL_PASSWORD
fi
fi

View File

@@ -0,0 +1,16 @@
{
"allowEmptyPassword": "{{$global.env.ALLOW_EMPTY_PASSWORD}}",
"database": "{{$global.env.MYSQL_DATABASE}}",
"masterHost": "{{$global.env.MYSQL_MASTER_HOST}}",
"masterPort": "{{$global.env.MYSQL_MASTER_PORT_NUMBER}}",
"masterRootPassword": "{{$global.env.MYSQL_MASTER_ROOT_PASSWORD}}",
"masterRootUser": "{{$global.env.MYSQL_MASTER_ROOT_USER}}",
"password": "{{$global.env.MYSQL_PASSWORD}}",
"port": "{{$global.env.MYSQL_PORT_NUMBER}}",
"replicationMode": "{{$global.env.MYSQL_REPLICATION_MODE}}",
"replicationPassword": "{{$global.env.MYSQL_REPLICATION_PASSWORD}}",
"replicationUser": "{{$global.env.MYSQL_REPLICATION_USER}}",
"rootPassword": "{{$global.env.MYSQL_ROOT_PASSWORD}}",
"rootUser": "{{$global.env.MYSQL_ROOT_USER}}",
"username": "{{$global.env.MYSQL_USER}}"
}

View File

@@ -32,7 +32,7 @@ $ docker-compose up -d
* [`8.0`, `8.0.11-r0` (8.0/Dockerfile)](https://github.com/bitnami/bitnami-docker-mysql/blob/8.0.11-r0/8.0/Dockerfile)
* [`8.0-ol-7`, `8.0.11-ol-7-r0` (8.0/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-mysql/blob/8.0.11-ol-7-r0/8.0/ol-7/Dockerfile)
* [`5.7`, `5.7.22-r48`, `latest` (5.7/Dockerfile)](https://github.com/bitnami/bitnami-docker-mysql/blob/5.7.22-r48/5.7/Dockerfile)
* [`5.7-ol-7`, `5.0.0-ol-7-r0` (5.7/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-mysql/blob/5.0.0-ol-7-r0/5.7/ol-7/Dockerfile)
* [`5.7-ol-7`, `5.7.22-ol-7-r0` (5.7/ol-7/Dockerfile)](https://github.com/bitnami/bitnami-docker-mysql/blob/5.7.22-ol-7-r0/5.7/ol-7/Dockerfile)
Subscribe to project updates by watching the [bitnami/mysql GitHub repo](https://github.com/bitnami/bitnami-docker-mysql).