Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Getting Started with Docker

Getting Started with Docker

Slides for a talk I gave at the [Franklin developer lunch & learn](http://www.meetup.com/franklin-developer-lunch/events/229490023/). The related repo is available on [GitHub](https://github.com/leejones/docker-lunch-and-learn).

Lee Jones

April 06, 2016
Tweet

More Decks by Lee Jones

Other Decks in Technology

Transcript

  1. WHAT IS DOCKER? Docker allows you to package an application

    with all of its dependencies into a standardized unit for so ware development. docker.com/what-docker
  2. VIDEOS 2 WATCH A web application for noting videos that

    you want to watch later. 2 components Ruby on Rails web application Postgresql database
  3. DOCKER FOR MAC AND WINDOWS Docker announced beta on March

    24, 2016. Docker for Mac and Windows
  4. OUTPUT $> docker run hello-world Hello from Docker. This message

    shows that your installation appear To generate this message, Docker took the follow 1. The Docker client contacted the Docker daemo 2. The Docker daemon pulled the "hello-world"
  5. DOCKERFILE FROM ruby:2.2.4 RUN apt-get update -qq && apt-get install

    -y bui RUN mkdir /videos2watch WORKDIR /videos2watch ADD Gemfile /videos2watch/Gemfile ADD Gemfile.lock /videos2watch/Gemfile.lock RUN bundle install ADD . /videos2watch
  6. BIN/SETUP echo "## Starting Postgresql..." docker-compose up -d db sleep

    5 # wait for database to start echo "## Setting up databases..." docker-compose run --rm web rake db:setup docker-compose run --rm -e RAILS_ENV=test web ra
  7. LEARN MORE (I highly recommend) (they are really good) The

    Docker Book Docker Docs Best practices for writing Dockerfiles
  8. THANK YOU! The slides, notes, and Dockerfile from this presentation

    are available at . github.com/leejones/docker-lunch-and-learn / Lee Jones @scribblethink