Last active
December 2, 2017 03:17
-
-
Save joselo/18ee97a03bc6f0ce533a80c7fbaf9122 to your computer and use it in GitHub Desktop.
Revisions
-
joselo revised this gist
Jan 6, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}") # Remove dangling images docker rmi $(docker images --filter "dangling=true" -q --no-trunc) # Ejecutar bash dentro de un servicio docker -
joselo revised this gist
Jan 6, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}") # Remove dangling images docker rmi $(docker images -f "dangling=true" -q) # Ejecutar bash dentro de un servicio docker -
joselo revised this gist
Jan 6, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}") # Remove dangling images docker rmi -f $(docker images -a | grep "<none>:<none>" | awk "{print \$3}") # Ejecutar bash dentro de un servicio docker -
joselo revised this gist
Jan 6, 2017 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,9 @@ docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}") # Remove dangling images docker rmi -f $(docker images | grep "<none>:<none>" | awk "{print \$3}") # Ejecutar bash dentro de un servicio docker $ docker-compose exec <service id> bash -
joselo revised this gist
Jan 5, 2017 . No changes.There are no files selected for viewing
-
joselo revised this gist
Jan 5, 2017 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,10 @@ docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}") # Ejecutar bash dentro de un servicio docker $ docker-compose exec <service id> bash # List containers docker ps -a @@ -17,7 +21,8 @@ docker images # Containers - stop all containers: docker kill $(docker ps -q) - remove all containers CUIDADO SI SE ELIMINA, SE VOLVERA A CREAR CON UN HASH DISTINTO PARA EL VOLUMEN. docker rm $(docker ps -a -q) - remove all docker images. docker rmi $(docker images -q) # Remover todos los volumens colgados -
joselo revised this gist
Jan 4, 2017 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,6 +20,11 @@ docker images - remove all containers. docker rm $(docker ps -a -q) - remove all docker images. docker rmi $(docker images -q) # Remover todos los volumens colgados $ docker volume rm `docker volume ls -q -f dangling=true` # Restore database docker exec -i qms_db_1 psql -U postgres < qms_production.back -
joselo revised this gist
Jan 4, 2017 . 1 changed file with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,3 +31,15 @@ sudo gpasswd -a USERNAME docker sudo systemctl restart docker # Interctive with database to backup or restore # Postgres $ docker exec -i yourdb_db_1 psql -U postgres < yourdb_development.back # Mysql $ docker exec -i wordpress_db_1 mysql -uroot -p -v -e "create database DATABASE_NAME" $ docker exec -i wordpress_db_1 mysql -uroot -pMYSQL_PASSWORD -v DATABASE_NAME < database_name.sql -
joselo revised this gist
Jan 2, 2017 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,6 +14,12 @@ docker rm -fv CONTAINER_ID docker images # Containers - stop all containers: docker kill $(docker ps -q) - remove all containers. docker rm $(docker ps -a -q) - remove all docker images. docker rmi $(docker images -q) # Restore database docker exec -i qms_db_1 psql -U postgres < qms_production.back -
joselo revised this gist
Dec 30, 2016 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,8 +19,9 @@ docker images docker exec -i qms_db_1 psql -U postgres < qms_production.back # LINUX RUN WITHOUT SUDO (After this restart the machine or logout and login again) sudo gpasswd -a USERNAME docker sudo systemctl restart docker -
joselo revised this gist
Dec 30, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,4 +23,4 @@ docker exec -i qms_db_1 psql -U postgres < qms_production.back sudo gpasswd -a USERNAME docker sudo systemctl restart docker -
joselo revised this gist
Dec 30, 2016 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,4 +16,11 @@ docker images # Restore database docker exec -i qms_db_1 psql -U postgres < qms_production.back # LINUX RUN WITHOUT SUDO sudo gpasswd -a USERNAME docker sudo systemctl docker restart -
joselo revised this gist
Dec 14, 2016 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,4 +12,8 @@ docker rm -fv CONTAINER_ID # List Images docker images # Restore database docker exec -i qms_db_1 psql -U postgres < qms_production.back -
joselo revised this gist
Dec 14, 2016 . 1 changed file with 13 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,15 @@ # Remove unused images docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}") # List containers docker ps -a # Kill container docker rm -fv CONTAINER_ID # List Images docker images -
joselo created this gist
Dec 14, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ # Remove unused images docker rmi -f $(docker images | grep "<none>" | awk "{print \$3}")