I always get bored writing the same commands over and over again when I'm working with Docker. So I decided to create a script to automate the process. And make it easier to use Docker, especially for beginners.
(Debian/Ubuntu) [HTTPS]
git clone https://github.com/Deril-fr/gazes-utils && cd gazes-utils && ./setup.sh
(Debian/Ubuntu) [SSH]
git clone [email protected]:Deril-fr/gazes-utils.git && cd gazes-utils && ./setup.sh
PS: Be sure to have the right permissions to execute the script. (after that it will be added to usr/local/bin)
If you have a bug with the script, it's probably because of the CR/LF. You can fix it by running this command:
find . -type f -exec sed -i 's/\r$//' {} \; # Do it before executing setup.sh
Start a new container with the specified image, container name and port in daemon mode.
gazes run <port> <container-name> <image-name>
gazes run 8080 my-container my-image
Stop and remove a Docker container. Pull the latest image. Start a new container with the updated image, using the same ports if specified and the same container name. Check if the new and old images are the same. If they are different, remove the old image.
[WARNING]: Use this only for an unique container and only with images from the same repository.
docker-clean <container-name> <image-name>
docker-clean my-container my-image