Public Repository

Last pushed: 5 months ago
Short Description
container with mysql-server (mariadb)
Full Description

1)

mkdir -p /docker/mariadb/

touch /docket/mariadb/env.list

--- file begin

MYSQL_ROOT_PASSWORD=1

=== file end

touch /docket/mariadb/run.sh

--- file begin

#!/bin/bash

docker run --detach --env-file=./env.list --hostname=mariadb.docker.iasa.kpi.ua --interactive=true --name=mariadb --publish=3306:3306 --tty=true --restart=always --volume=/docker/mariadb/data:/data --volume=/docker/mariadb/my.cnf:/etc/mysql/conf.d/zanner.cnf mariadb:latest /data/init.sh

=== file end

chmod +x /docket/mariadb/run.sh

touch /docket/mariadb/my.cnf

--- file begin

http://dev.mysql.com/doc/mysql/en/server-system-variables.html

[mysqld]

user=mysql

bind_address=0.0.0.0

datadir=/data/usr/mysql-data

general_log=1

general_log_file=/data/var/log/mysql.log

slow_query_log=1

slow_query_log-file=/data/var/log/mysql-slow.log

long_query_time=4

debug=1

=== file end


2)

mkdir -p /docker/mariadb/data/

touch /docker/mariadb/data/init.sh

--- file begin

#!/bin/bash

service mysql start;

service mysql status;

bash

=== file end

chmod +x /docker/mariadb/data/init.sh


3)

mkdir -p /docker/mariadb/data/usr/mysql-data

mkdir -p /docker/mariadb/data/var/log

Docker Pull Command
Owner
zanner

Comments (0)