Physical Server Physical Server Host OS App A App B Libs Libs Guest OS Virtual Hardware / BIOS Docker Engine Container (Process) App A Libs Container App A Libs Container VirtualMachine
creation many containers can be created based on one image for specific requirements: use volumes https://www.docker.com/sites/default/files/products/what_is_layered_filesystems_sm.png Images and Container
Dockerfile FROM java:8 MAINTAINER Bernd Fischer "[email protected]" ENV MODIFIED_AT 2015-09-26_1845 COPY demo-helloworld-web.jar /opt/demo-helloworld-web/ # mvn -PbuildDockerWorkDir # copy Dockerfile and “Fat-Jar” in same dir # should be called from project root dir docker build -t mapp/demo-helloworld-web04:latest \ -f $(pwd)/target/workdir-docker/Dockerfile \ $(pwd)/target/workdir-docker
Images expected in Dockerhub or GiantSwarm own private registry # own CLI swarm login swarm ls swarm create swarm start / swarm stop swarm status swarm logs swarm logout