Docker notes

Docker notes, related to docker-compose mostly

List running "physicall node"
docker node ls

List services on node
docker service ls

docker service ps SERVICE_ID

docker stack ls

tar

tar
tar -zcvf prog-1-jan-2005.tar.gz /home/jerry/prog

untar
$ tar -zxvf prog-1-jan-2005.tar.gz

Check db size

Check mysql

SELECT table_name AS "Table", ROUND(((data_length + index_length) / 1024 / 1024), 2) AS "Size (MB)" FROM information_schema.TABLES WHERE table_schema = "DB_name" ORDER BY (data_length + index_length) DESC;