Skip to content

Instantly share code, notes, and snippets.

@jeygeethan
Last active November 17, 2019 07:11
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save jeygeethan/2eac49482def3fad647b66521b77593e to your computer and use it in GitHub Desktop.
Save jeygeethan/2eac49482def3fad647b66521b77593e to your computer and use it in GitHub Desktop.
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
Copy link

docker-engine should be replaced by docker-ce

@dreamflame51
Copy link

any machine? won't work on windows for sure

@Jenil2910
Copy link

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

@jcbombardelli
Copy link

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