Skip to content

Instantly share code, notes, and snippets.

@gsouf
Created July 11, 2014 08:15
Show Gist options
  • Save gsouf/674cd92157674f5ab518 to your computer and use it in GitHub Desktop.
Save gsouf/674cd92157674f5ab518 to your computer and use it in GitHub Desktop.
Docker reminder

Working with docker containers

  • Daemonizing a container

$ docker run -d

  • Leaving the container

CTRL+P -> q

  • Leaving the container

CTRL+P -> q

  • Listing containers

$ docker ps

  • Limiting memory usage of container

$ docker run -m 64m

Networkly reachable docker container

  • localy reachable on port 80

$ docker run -p 127.0.0.1::80

  • remotly reachable on port 80

$ docker run -p 80:80

  • remotly reachable on port 8080 host => 80 container

$ docker run -p 8080:80

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