Loading
Raül Martínez i Peris
This is a live streamed presentation. You will automatically follow the presenter and see the slide they're currently on.
101
What it's?
or...
Does that make?
Docker "enables true independence between applications and infrastructure and developers".
docker engine
image
application
container
FROM ruby:2.4.2
RUN apt-get update
RUN gem install bundler
ENV HOME=/home/project
RUN mkdir -p $HOME
ADD . $HOME
WORKDIR $HOME
RUN bundle install
FROM ruby:2.4.2
RUN apt-get update
RUN gem install bundler
ENV HOME=/home/project
RUN mkdir -p $HOME
ADD . $HOME
WORKDIR $HOME
RUN bundle install
image to use
FROM ruby:2.4.2
RUN apt-get update
RUN gem install bundler
ENV HOME=/home/project
RUN mkdir -p $HOME
ADD . $HOME
WORKDIR $HOME
RUN bundle install
execute a command
FROM ruby:2.4.2
RUN apt-get update
RUN gem install bundler
ENV HOME=/home/project
RUN mkdir -p $HOME
ADD . $HOME
WORKDIR $HOME
RUN bundle install
set an environment variable
FROM ruby:2.4.2
RUN apt-get update
RUN gem install bundler
ENV HOME=/home/project
RUN mkdir -p $HOME
ADD . $HOME
WORKDIR $HOME
RUN bundle install
add/copy to guest
FROM ruby:2.4.2
RUN apt-get update
RUN gem install bundler
ENV HOME=/home/project
RUN mkdir -p $HOME
ADD . $HOME
WORKDIR $HOME
RUN bundle install
set the workdir
version: '2'
services:
name_of_service:
image: name_of_image
container_name: name_of_container
build: .
volumes:
- .:/home/project
- bundle:/usr/local/bundle
command: bash -c "rspec"
volumes:
bundle:
driver: local