mirror of
https://github.com/bitnami/containers.git
synced 2026-04-07 09:48:08 +08:00
8.0.11-r0 release
Initial release version 8.0.11
This commit is contained in:
30
bitnami/mysql/8.0/Dockerfile
Normal file
30
bitnami/mysql/8.0/Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM bitnami/minideb-extras:jessie-r36
|
||||
LABEL maintainer "Bitnami <containers@bitnami.com>"
|
||||
|
||||
# Install required system packages and dependencies
|
||||
RUN install_packages libaio1 libc6 libgcc1 libncurses5 libnuma1 libsasl2-2 libssl1.0.0 libstdc++6 libtinfo5 zlib1g
|
||||
RUN bitnami-pkg unpack mysql-8.0.11-0 --checksum 5ca106d27def3ff1f5d0582809a33b46c66590a96e50ac6ef3fee024011b5b41
|
||||
|
||||
COPY rootfs /
|
||||
ENV ALLOW_EMPTY_PASSWORD="no" \
|
||||
BITNAMI_APP_NAME="mysql" \
|
||||
BITNAMI_IMAGE_VERSION="8.0.11-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:/opt/bitnami/mysql/sbin:$PATH"
|
||||
|
||||
EXPOSE 3306
|
||||
|
||||
ENTRYPOINT ["/app-entrypoint.sh"]
|
||||
CMD ["nami","start","--foreground","mysql"]
|
||||
18
bitnami/mysql/8.0/docker-compose.yml
Normal file
18
bitnami/mysql/8.0/docker-compose.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: 'bitnami/mysql:8.0'
|
||||
labels:
|
||||
kompose.service.type: nodeport
|
||||
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
|
||||
14
bitnami/mysql/8.0/rootfs/app-entrypoint.sh
Executable file
14
bitnami/mysql/8.0/rootfs/app-entrypoint.sh
Executable 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 -- "$@"
|
||||
51
bitnami/mysql/8.0/rootfs/init.sh
Normal file
51
bitnami/mysql/8.0/rootfs/init.sh
Normal 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
|
||||
|
||||
16
bitnami/mysql/8.0/rootfs/mysql-inputs.json
Normal file
16
bitnami/mysql/8.0/rootfs/mysql-inputs.json
Normal 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}}"
|
||||
}
|
||||
@@ -27,6 +27,13 @@ $ docker-compose up -d
|
||||
* Bitnami images are built on CircleCI and automatically pushed to the Docker Hub.
|
||||
* All our images are based on [minideb](https://github.com/bitnami/minideb) a minimalist Debian based container image which gives you a small base container image and the familiarity of a leading linux distribution.
|
||||
|
||||
# Supported tags and respective `Dockerfile` links
|
||||
|
||||
- [`8.0`, `8.0.11-r0` (8.0/Dockerfile)](https://github.com/bitnami/bitnami-docker-mysql/blob/8.0.11-r0/8.0/Dockerfile)
|
||||
- [`5.7`, `5.7.22-r9`, `latest` (5.7/Dockerfile)](https://github.com/bitnami/bitnami-docker-mysql/blob/5.7.22-r9/5.7/Dockerfile)
|
||||
|
||||
Subscribe to project updates by watching the [bitnami/mysql GitHub repo](https://github.com/bitnami/bitnami-docker-mysql).
|
||||
|
||||
# Get this image
|
||||
|
||||
The recommended way to get the Bitnami MySQL Docker Image is to pull the prebuilt image from the [Docker Hub Registry](https://hub.docker.com/r/bitnami/mysql).
|
||||
@@ -485,7 +492,7 @@ $ docker-compose start mysql
|
||||
# Notable Changes
|
||||
|
||||
## 5.7.21-r6
|
||||
- The MySQL conf file is not in a persistent volume by default.
|
||||
- The MySQL conf file is not in a persistent volume by default.
|
||||
- The user is able to specify a custom file in the default location '/opt/bitnami/mysql/conf/my.cnf'.
|
||||
|
||||
## 5.7.17-r4
|
||||
|
||||
@@ -5,8 +5,8 @@ jobs:
|
||||
docker:
|
||||
- image: docker:17.06.0-ce-git
|
||||
environment:
|
||||
RELEASE_SERIES_LIST: "5"
|
||||
LATEST_STABLE: "5"
|
||||
RELEASE_SERIES_LIST: "8.0,5.7"
|
||||
LATEST_STABLE: "5.7"
|
||||
IMAGE_NAME: mysql
|
||||
DOCKER_PROJECT: bitnami
|
||||
QUAY_PROJECT: bitnami
|
||||
|
||||
Reference in New Issue
Block a user