To share the experiences to create docker containers of databases, for stream duplication of data via master and slave.
- Windows home additon does not support Docker ce for windows.
- You may encounter error when installing Docker with the installer downloaded from the official website.
- Database services should be run standalone when the new container is created.
- You may encounter D-Bus failure when you want to run the "posgresql*.*-setup initdb". This is solvable if your create a standalone command when creating the new container.
~$ sudo docker run -d –name=containername –privileged=true imangename:tagname /usr/sbin/init
- "run" is equavilent to "create";
- -d means the command is working at background;
- –name gives the name of your container;
- –privileged specifies the root privilege in the container;
- imagename:tagname gives the image used to create the container;
- /usr/sbin/init is the guard process running for -d.
- attach does not have rich options to run script in the container.