3145 views|1 replies

13

Posts

0

Resources
The OP
 

Automatically generate Dockerfile to build Docker image [Copy link]

This post was last edited by liuyongsuse on 2020-12-6 00:55

You can build a Docker image by automatically generating a Dockerfile through the configuration of pom.xml without Dockerfile. The Dockerfile file needs to be placed in the project root directory, that is, at the same level as pom.xml.

Obviously, the official recommendation is the dockerfile-maven method that relies on Dockerfile. However, when installing a project, you only need to configure pom.xml to use docker-maven-plugin, and you don't need to modify external configurations, so it is more convenient and worry-free. The following will explain how to complete the image structure of these two methods one by one. You don't need Dockerfile, and you can simply automatically generate Dockerfile through the configuration of pom.xml to build a Docker image.

Relying on the Dockerfile file, it needs to be placed in the project root directory, that is, at the same level as pom.xml. Although the official recommendation is the Dockerfile-maven method that relies on Dockerfile, when installing the project, you only need to configure pom.xml and you don’t need to modify the external configuration, so it is more convenient and worry-free. The following will explain how to complete the image construction in these two methods one by one. The youlai-gateway gateway module is used for construction. The docker-maven-plugin method constructs the image.

This post is from Linux and Android

Latest reply

Oh shit, is this Taobao translation?   Details Published on 2020-12-7 18:20

7422

Posts

2

Resources
2
 

Oh shit, is this Taobao translation?

This post is from Linux and Android
 
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list