En este nuevo Refcardz

El equipo de DZone nos presentan Docker desde el punto de vista de contenedores para Java.

La Arquitectura Docker:

Donde el cliente Docker le pide al Docker daemon vías Sockets o RESTful que construya, ejecute y distribuya los contenedores Docker:

Terminología

· Docker Images Read-only templates that use union file systems to combine layers—making them very lightweight. Images are built from Dockerfiles.

· Docker Registries Store Docker images. Users can push (or publish) their images to a public registry (like Docker Hub) or to their own registry behind a firewall. Registries store the “tagged” images—allowing users to maintain different versions of the same image.

· Docker Containers Virtualized application environments that run on a Docker Host in isolation. Containers are launched from Docker images, adding a read-write layer on top of the image (using a union file system) as well as the network/bridge interface and IP address. When a container is launched, the process specified in the Dockerfile is executed and the logs are captured for auditing and diagnostics.

· Dockerfiles Composed of various commands (instructions) listed successively to automatically perform actions on a base image in order to create a new one. The instructions specify the operating system, application artifacts, data volumes, and exposed ports to be used, as well as the command (or script) to run when launching a Docker container.

· Docker Host A Linux host (either a physical/bare-metal server or a virtual machine) that is running a Docker daemon on which images can be built, pulled or pushed and containers can run in isolation.

· Docker Client Command-line utility or other tool that takes advantage of the Docker API (docs.docker.com/reference/api/docker_ remote_api) to communicate with a Docker daemon

Docker con Java:

Docker puede usarse para empaquetar una JVM junto a los JARs y WARs y otras partes de la aplicación en un contenedor que puede ejecutar en cualquier host Linux, eliminando la complejidad de versions de librerías.

Contenizar aplicaciones Java es complejo, por suerte DCHQ ofrece un framework de composición que extiende Docker Compose.

Una vez la aplicación se ha provisionado se puede monitorizar la CPU, memoria, I/O del contenedor, notificaciones,…

Leer más

Anuncios