#!/usr/bin/env bash read -p "\$DATA directory: " DATA_DIRECTORY REALDIR=$(readlink -f "${DATA_DIRECTORY}") mkdir -p "${DATA_DIRECTORY}" mkdir "${DATA_DIRECTORY}/conf" "${DATA_DIRECTORY}/cert" "${DATA_DIRECTORY}/mysql" chown 1001:1001 "${DATA_DIRECTORY}/cert" "${DATA_DIRECTORY}/mysql" docker run --rm -v "${REALDIR}"/cert:/cert percona/percona-xtradb-cluster:8.0 mysql_ssl_rsa_setup -d /cert