更新时间:2021-07-02 18:45:33
cover
Title Page
Copyright
Docker and Kubernetes for Java Developers
Credits
About the Author
About the Reviewer
www.PacktPub.com
Why subscribe?
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
Introduction to Docker
The idea behind Docker
Virtualization and containerization compared
Benefits from using Docker
Docker concepts - images and containers
Images
Layers
Containers
Docker registry repository and index
Additional tools
Installing Docker
Installing on macOS
Installing on Linux
Installing on Windows
Summary
Networking and Persistent Storage
Networking
Docker network types
Bridge
Host
None
Networking commands
Creating and inspecting a network
Connecting a container to the network
Exposing ports and mapping ports
Persistent storage
Volume-related commands
Creating a volume
Removing a volume
Volume drivers
Working with Microservices
An introduction to microservices
Monolithic versus microservices
The monolithic architecture
The microservices architecture
Maintaining data consistency
The Docker role
Kubernetes' role
When to use the microservice architecture
Creating Java Microservices
Introduction to REST
HTTP methods
REST in Java
Java EE7 - JAX-RS with Jersey
JAX-RS annotations
Spring Boot
Coding the Spring Boot microservice
Maven build file
Application entry point
Domain model and a repository
REST controller
Documenting the API
Running the application
Making calls
Spring RestTemplate
HTTPie
Postman
Paw for Mac
Spring Initializr
Creating Images with Java Applications
Dockerfile
Dockerfile instructions
FROM
MAINTAINER
WORKDIR
ADD
COPY
RUN
CMD
The ENTRYPOINT
EXPOSE
VOLUME
LABEL
ENV
USER