Skip to content

Instantly share code, notes, and snippets.

@eloisetaylor5693
Last active May 16, 2022 08:41
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 eloisetaylor5693/a5d63b9e950b4849ab607f389443c3dd to your computer and use it in GitHub Desktop.
Save eloisetaylor5693/a5d63b9e950b4849ab607f389443c3dd to your computer and use it in GitHub Desktop.
Docker cheatsheet

Docker

Set custom image name: docker build -t image_name .

Set custom container name docker run --name container_name image_name

Docker compose

Override the project name docker-compose run -p project_name

General

Open container's terminal: docker exec -it <mycontainer> bash

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