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

RheinJug2014: Docker und Microservices

RheinJug2014: Docker und Microservices

**Docker microservices talk**

Here you can find my docker slide deck container from my [RheinJUG 2014 - GER: Der perfekte Match: Mit Docker Java Microservices produzieren ][1] talk.

- start slide as a container with `docker run -d -p 8000:80 rossbachp/docker-microservices:rheinjug2014`
- open your browser with `http :8000/docker-microservices`
- video [GER: Der perfekte Match: Mit Docker Java Microservices produzieren ][2] is now avaiable!

Feedback welcome

[Peter Rossbach][3]

[1]: http://rheinjug.de/knowledge/vortr-mainmenu-28/229-docker3010
[2]: http://mediathek.hhu.de/watch/d85a8ad7-8c33-4434-918f-6babec62e4e4
[3]: http://twitter.com/PRossbach

Peter Rossbach

November 18, 2014
Tweet

More Decks by Peter Rossbach

Other Decks in Programming

Transcript

  1. 20 / 86 © 2014 <[email protected]>, @PRossbach, RheinJug Duesseldorf $

    docker run -ti --rm ubuntu:14.04 /bin/bash $ apt-get update $ apt-get install -y apache2 $ # CTRL-P CTRL-Q to leave container $ CID=$(docker ps -lq) $ docker commit --author="Peter Rossbach <[email protected]>" \ $CID bee42/apache2:rheinjug2014.1 $ docker images | grep apache2 bee42/apache2 rheinjug2014.1 2a78c3879b0a 2 days ago 228 MB
  2. 21 / 86 © 2014 <[email protected]>, @PRossbach, RheinJug Duesseldorf FROM

    ubuntu:14.04 RUN \ apt-get update && \ apt-get install -y apache2 && \ mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 && \ apt-get clean autoclean && \ apt-get autoremove -y && \ rm -rf /var/lib/{apt,dpkg,cache,log}/ EXPOSE 80 CMD [ "/usr/sbin/apache2ctl", "-DFOREGROUND" ]
  3. 22 / 86 © 2014 <[email protected]>, @PRossbach, RheinJug Duesseldorf $

    docker build -t="bee42/apache2:rheinjug2014.2" . $ docker images | grep apache2 bee42/apache2 rheinjug2014.2 3c96284beff0 2 days ago 227.9 MB bee42/apache2 rheinjug2014.1 2a78c3879b0a 2 days ago 228 MB $ docker run -dti -p 8002:80 bee42/apache2:rheinjug2014.2
  4. 23 / 86 © 2014 <[email protected]>, @PRossbach, RheinJug Duesseldorf $

    docker login $ docker push "bee42/apache2:rheinjug2014.2" docker pull <username>/<imagename>:<tag>
  5. 45 / 86 © 2014 <[email protected]>, @PRossbach, RheinJug Duesseldorf $

    docker run -d --name redis.0 -p 10000:6379 \ -e "SERVICE_NAME=db" \ -e "SERVICE_TAGS=master,backups" \ -e "SERVICE_REGION=us2" dockerfile/redis { "ID": "hostname:redis.0:6379", "Name": "db", "Port": 10000, "IP": "192.168.1.102", "Tags": ["master", "backups"], "Attrs": {"region": "us2"} }
  6. 85 / 86 © 2014 <[email protected]>, @PRossbach, RheinJug Duesseldorf docker

    run -d -p 8000:80 rossbachp/docker-microservices:rheinjug2014