Doing a backup of your mysql container's DB can be automated just like any other task. Script below is one way to do it. You may or may not provide a parameter to the script and you'll always get the gzipped version of the backup + its sha256 checksum. Sample Use Case: use it without parameters 1~$ ./backup_db.sh …
Read MoreSometimes, you may need to know which container a volume is associated with. Use this command: 1docker ps -a --filter volume=VOLUME_NAME_OR_MOUNT_POINT See https://stackoverflow.com/questions/42857575/how-to-determine-what-containers-use-the-docker-volume
Read MoreI encounter an issue where I don't have local composer installed but I need to run one. Solution is to run it on the fly from docker container: 1docker run --rm --interactive --tty --volume <directory_path_to_your_composer.json>:/app composer install
Read MoreCheck first the names of your container: 1docker ps Technically though, it's just running a shell, so run as follows: 1docker exec -it <container-name> /bin/bash In case you see this error: 1OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: …
Read More1docker logs <friendly-name|container-id> You can tail it much like tailing ordinary logs: 1docker logs -f --tail=5 <friendly-name|container-id> which means: "start tailing at current last 5 entries of the logs"
Read MoreExample scenario: 1[root@selenium php-5.1.2]# docker build -t php5_1_2 . 2Sending build context to Docker daemon 8.071MB 3Step 1/9 : FROM nubs/arch-build 4---> a68cd3855bfe 5Step 2/9 : MAINTAINER Spencer Rinehart <anubis@overthemonkey.com> 6---> Using cache 7---> 0d099a2cd179 8Step 3/9 : COPY …
Read More1[root@selenium02 ~]# docker rmi ad66a5961263 2Error response from daemon: conflict: unable to delete ad66a5961263 (must be forced) - image is being used by stopped container 088219585a61 3[root@selenium02 ~]# docker rmi -f ad66a5961263
Read More