Using Docker in development for Java EE applications

后端 未结 7 1075
北荒
北荒 2021-02-05 13:59

I will add 300 points as bounty

I have recently started to take a closer look at Docker and how I can use it for faster getting new member of t

相关标签:
7条回答
  • 2021-02-05 14:55

    You might want to have a look at rhuss/docker-maven-plugin. It allows a seamless integration for using docker as your deployment unit:

    • Use a standard Maven assembly descriptor for building images with docker:build, so you generated WAR file or your Microservice can be easily added to a Docker image.
    • You can push the created image with docker:push
    • With docker:start and docker:stop you can utilize your image during unit tests.

    This plugin comes with a comprehensive documentation, if there are any open questions, please open an issue.

    And as you might have noticed, I'm the author of this plugin ;-). And frankly, there are other docker-maven-plugins out there, which all have a slightly different focus. For a simple check, you can have a look at shootout-docker-maven which provides sample configurations for the four most active maven-docker-plugins.

    The workflow then simply shifts the artifact boundary from WAR/EAR files to Docker images. mvn docker:push moves them to a Docker registry from where it is pulled during the various testing stages used in a continuous delivery pipeline.

    0 讨论(0)
提交回复
热议问题