Skip to content

Instantly share code, notes, and snippets.

@nopeless
Last active September 16, 2025 04:37
Show Gist options
  • Select an option

  • Save nopeless/1af31cadb6de560881c280075f6f65b4 to your computer and use it in GitHub Desktop.

Select an option

Save nopeless/1af31cadb6de560881c280075f6f65b4 to your computer and use it in GitHub Desktop.

so, it is possible to use docker containers as a lightweight "use and throw away" vm

docker run -dit --name ubuntu ubuntu:24.04
# can also expose all host
docker run -dit --network host --name ubuntu ubuntu:24.04
docker exec -it ubuntu bash

next time you start the container it stays alive

docker stop ubuntu
docker start ubuntu
docker ps # still alive!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment