Skip to content

Instantly share code, notes, and snippets.

@fhdalikhan
Created May 29, 2020 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fhdalikhan/55c0a4d2d03e773f4e8c0c593df4cd17 to your computer and use it in GitHub Desktop.
Save fhdalikhan/55c0a4d2d03e773f4e8c0c593df4cd17 to your computer and use it in GitHub Desktop.
Docker Commands
# to create a build
docker-compose build
# to run containers in detached mode
docker-compose up -d
# to stop containers
docker-compose down
# to push a new tag to the repository,
docker push <hub-user>/<repo-name>[:<tag>]
# to view running containers and their id
docker ps
# create a commit, use container id in <existing-container> below
docker commit <existing-container> <hub-user>/<repo-name>[:<tag>] to commit changes
# now you can push this repository to the registry designated by its name or tag.
docker push <hub-user>/<repo-name>:<tag>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment