on top of the Linux kernel Docker Engine can only be run directly on Linux OS Boot2docker is needed for Mac and Microsoft Windows OS https://docs.docker.com/installation/windows/#learn thekeyconceptsbeforeinstalling
for defining and running multicontainer applications with Docker. With Compose, you define a multi container application in a single file, then spin your application up in a single command which does everything that needs to be done to get it running. (source – http://docker.com) OpenNMS (Container) PostgreSQL (Container) Link docker-compose.yml opennms: image: opennms/app:16.0.2-1_co66 environment: - DB_POSTGRES_PASSWORD=mysecretpassword ports: - "8980:8980" - "18980:18980" - "1099:1099" - "8101:8101" - "61616:61616" links: - postgres postgres: image: postgres:9.4 environment: - DB_POSTGRES_PASSWORD=mysecretpassword ports: - "5432:5432"
build on top of another Docker image The first image layer is called a base image All the other layers except the last image layer are called parent images Images inherit all the properties and settings of their parent images Images can be referenced by image ID or names Local Docker images can be listed with $ docker images
created when we execute $ docker run <image> A writeable layer is added on top of all the image layers This layer can have two different states: running exited Changes are permanent between start & stop Changes are not written to the underlying image
DSL that contains instructions on setting up a Docker image The docker build command builds an image from a Dockerfile OpenNMS Docker files are maintained on GitHub: https://github.com/opennmsforge/opennmsdockerfiles # Comment INSTRUCTION arguments FROM opennms/postgresql:pg9.3_co6.6 MAINTAINER [email protected] & [email protected] # Set work dir WORKDIR /tmp # JAVA ENV ENV JAVA_VERSION 8u45 ENV BUILD_VERSION b14 ENV JAVA_HOME=/usr/java/orajava8 # OPENNMS ENV ENV OPENNMS_HOME /opt/opennms ...