Skip to content

Latest commit

 

History

History
31 lines (27 loc) · 1.2 KB

File metadata and controls

31 lines (27 loc) · 1.2 KB

Images

  • docker build . build
  • docker build -t repo:tag . build with tag
  • docker images list
  • docker inspect image_id inspect
  • docker rmi image_id delete
  • docker run image_id create + start
  • docker tag image_id repo:tag tag

Container

  • docker create image_id create
  • docker exec -it container_id bash exec bash
  • docker ps list running
  • docker ps -a list all
  • docker start container_id start
  • docker stop container_id stop
  • docker cp container_id:/path/file/ /path/file copies file out of container
  • docker rm container_id delete container

Docker Compose

  • docker-compose up tbd
  • docker-compose build tbd

Misc

Layer indicates changes that are made to an image.

FROM rails:onbuild                   < Base-layer
ENV RAILS_ENV production             < layer 2
ENTRYPOINT ["bundle", "exec", "puma”]< layer 3