Public Repository

Last pushed: a year ago
Short Description
Golang with mariadb environment
Full Description


Command related to mariadb

Command Details
--privileged Given access to all devices
-e "container=docker" Set environment variable
-v /sys/fs/cgroup/:/sys/fs/cgroup Mount /sys/fs/cgroup/
-p 3306:3306 Open mysql port 3306
-e MARIADB_PASS="YOUR_PASSWORD" Set your mariaDB password *1
--volumes-from OTHER_CONTAINER_DB Mount database data from other container

1 : You MUST set the password for DB root

Others command

Command Details
-net host Use the host's network stack inside the container.
-v YOUR_GOPATH:/goProgram Mount your go work dir to default goProgram path

Start Container:

The complete start command:

docker run --privileged -idt --name gomaria -e "container=docker" -v /sys/fs/cgroup/:/sys/fs/cgroup -p 3306:3306 -e MARIADB_PASS="YOUR_PASSWORD" --volumes-from OTHER_CONTAINER_DB --net host --log-driver none -v YOUR_GOPATH:/goProgram lukewayne123/golang-mariadb


Generate golang with mariadb environment
refer to

Docker Pull Command