FROM ubuntu
# make sure the package repository is up to date
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main
universe" > /etc/apt/sources.list
RUN apt-get update
# install memcached
RUN apt-get install -y memcached
# run as user daemon (memcached doesn't allow to run as root)
USER daemon
# expose memcached port
EXPOSE 11211
# Launch memcached when launching the container
ENTRYPOINT ["memcached"]
• Public image repository
• Similar to npm, PyPI, bower, apt, yum, ...
• Trusted builds
• Search from docker cli
• https://index.docker.io
Docker index
Slide 20
Slide 20 text
docker login
docker push dockerbel/memcached
Slide 21
Slide 21 text
No content
Slide 22
Slide 22 text
git checkout application
Slide 23
Slide 23 text
FROM ubuntu
ENV NODE_VERSION 0.10.24
# Install common packages
RUN apt-get update
RUN apt-get install -y wget
# Install node
RUN mkdir /opt/node-$NODE_VERSION
RUN wget -O /tmp/node-$NODE_VERSION.tar.gz http://nodejs.org/
dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz
RUN tar zxf /tmp/node-$NODE_VERSION.tar.gz --strip-components=1
--no-same-owner -C /opt/node-$NODE_VERSION
RUN ln -s /opt/node-$NODE_VERSION/bin/node /usr/local/bin/node
RUN ln -s /opt/node-$NODE_VERSION/bin/npm /usr/local/bin/npm
ADD . /var/www
RUN cd /var/www && npm install
EXPOSE 3000
CMD [ "node", "/var/www/server.js" ]
Slide 24
Slide 24 text
# run memcache container
docker run -d -name memcache dockerbel/memcached
# run app container, linked to memcache container
docker run -d -p 3000:3000
-e ENV=dev
-link memcache:mc
-v /tmp/log/app:/var/log/app:rw
-name app dockerbel/app
Slide 25
Slide 25 text
• Maturity (1.0 in the next months)
• Pluggable approach
• Wider OS support
• More filesystem options
What’s next?
Slide 26
Slide 26 text
• Deis - deployment and orchestration
• Dokku - deployment
• Fig - deployment
• Flynn - deployment and orchestration
• Shipyard - monitoring
Community
Slide 27
Slide 27 text
Questions?
Slide 28
Slide 28 text
Thank you!
Docker Belgium - #dockerbel
Nils De Moor - @ndemoor
Psst... we’re hiring