Skip to content

Instantly share code, notes, and snippets.

@shanereddy
shanereddy / docker-cheatsheet.md
Last active February 27, 2018 13:39
Docker cheatsheet

Docker commands cheatsheet

Creating an image

From current dir with Dockerfile

docker build -t <tag-name> .

Using no cache

docker build -t <tag-name> . --no-cache

Running a container

With env vars

docker run -d -p 6262:6262 -e "LOG_LEVEL=error" -e "NODE_ENV=production" -t

Keybase proof

I hereby claim:

  • I am shanereddy on github.
  • I am shane_r (https://keybase.io/shane_r) on keybase.
  • I have a public key ASAZFTS4dBiZlthEz0xEHB0yiVhPWtwNR1_vPZdp-Y_wuAo

To claim this, I am signing this object:

@shanereddy
shanereddy / index.md
Created July 3, 2016 20:41 — forked from rstacruz/index.md
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one