Last active
April 23, 2019 00:56
-
-
Save jer-k/e9156acc81ee800ba3fe83a0df0dcd70 to your computer and use it in GitHub Desktop.
I need to remember all these things
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can exec into a container as root, rathern the defined USER | |
`docker exec -it --user root <> <cmd> | |
# Logging Related | |
`docker container logs —tail 5 <id>` | |
# Tagging and Pushing Images | |
The most generic way to define an image tag is <registry URL>/<User or Org>/<name>:<tag>. | |
When pushing, given no registry, Dockerhub is assumed. | |
``` | |
docker image tag alpine:latest gnschenker/alpine:1.0 | |
docker login -u gnschenker -p <my secret password> | |
docker image push gnschenker/alpine:1.0 | |
``` | |
# Quickly running a Rails Server | |
Bind the host port 3000 to local 3000 and listen to all IP addresses not just localhost (127.0.0.1) | |
`docker run -p 3000:3000 <image> bin/rails s -b 0.0.0.0` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment