Instantly share code, notes, and snippets.

Embed
What would you like to do?
reinstall docker on any machine
#!/usr/sh
sudo service docker stop && sudo apt-get purge -y docker-engine && sudo apt-get autoremove --purge -y docker-engine && sudo rm -rf /var/lib/docker && sudo apt-get update && sudo apt-get install -y docker-engine && sudo service docker start && sudo docker run hello-world && sudo usermod -aG docker $USER
@franciscohanna92

This comment has been minimized.

franciscohanna92 commented Jan 24, 2018

docker-engine should be replaced by docker-ce

@dreamflame51

This comment has been minimized.

dreamflame51 commented Apr 4, 2018

any machine? won't work on windows for sure

@Jenil2910

This comment has been minimized.

Jenil2910 commented May 21, 2018

instead of #!/usr/sh, it should be #!/usr/bin/sh

@jcbombardelli

This comment has been minimized.

jcbombardelli commented Oct 5, 2018

You could change from "any machine" to "linux like's debian" because doesn't works with Red Hat's like and doesn't work Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment