Tag Archives: devops

Docker Persistent Storage for MySQL Server and SELinux

hello everyone today we will make

MySQL Docker Container with Shared Storage

first let’s pull latest MySQL  version of docker

after we did download the latest image

this image come in handy with some awesome parameters

  1. MYSQL_ROOT_PASSWORD
  2. MYSQL_DATABASE

with this  parameters, we can create a database and set root password for mysql

now let’s create a folder in our host so we can use it instead of /var/lib/mysql (let’s keep the mysql data in the host not inside a container)

remember it should be numeric formate

then we change the folder context to for selinux to  treat this as a virtualized sandbox

here we created a database called unixawy and root password un1x4wyp4ssw0rd

inspect your docker and connect to it IP

now each container you run with this command will share the same database data

check database content in your node storage via ls /var/mysql_data_store

cheers

Docker Containers Crash Course

Docker Crash Course

As Hypervisor is slow to boot and use a lot of resources and needs full installation

the Container Technology not that old we used to use LXC – openVZ extra

but what a cool about Docker is it really lightweight with awesome images build  and we can ship many services in one machine

it comes into two parts [DockerClient,  DockerServer]

and today i will write the best quick intro i could tell

1 – Introduction [how it will work]

docker run the process inside the container and when it has done it EXIT the container ( by EXIT I mean it STOP the container )

docker has official images [distros] called  saved in ( registry ) there is public registry also you can have a private registry, example hub.docker.com

Continue reading