More Related Content
Similar to Docker: from zero to nonzero (20)
Docker: from zero to nonzero
- 2. WHO AM I?
- Francesco Lo Franco
- @__kekko
- Software Developer
@chupamobile.com
- PUG Roma member since 2014
- 8. What is an Image?
FROM ubuntu:14.04
RUN apt-get update
RUN apt-get install -y curl nginx
Dockerfile
$ docker build .
- 9. What do we do with an
image?
We create a container
based on it!
- 10. What is a Container?
An instance of an image
- 11. What can we do with a
Container?
❏ execute process in bg
❏ execute task
- 12. Process in bg practically
$ docker run --name image_name
-p 8080:80
-d
nginx redis mysql elasticsearch ...
- 14. execute task example
Running composer install with
HHVM without having an HHVM as
dependency in my project
(HHVM is faster with composer!)
- 15. FROM ubuntu:14.04
ENV HOME /root
# Install Deps
RUN apt-get install -y -qq git curl wget hhvm
# Install composer
RUN bash -c "wget http://getcomposer.
org/composer.phar && mv composer.phar
/usr/local/bin/composer"
WORKDIR /srv
ENTRYPOINT ["hhvm", "/usr/local/bin/composer"]
- 17. VANTAGGI?
▸ no overhead
▸ very fast
▸ a lot of pre-built images
▸ microservices?
▸ AWS, Google etc
▸ Tutum, Compose,
Machine, Swarm etc...