Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Jeepay
Commits
cea60b16
Unverified
Commit
cea60b16
authored
Apr 27, 2022
by
大森林
Committed by
Gitee
Apr 27, 2022
Browse files
!17 添加插件,实现docker 构建镜像及推送镜像
Merge pull request !17 from yhydev/future-docker
parents
cbdfae5b
56e8b473
Changes
5
Hide whitespace changes
Inline
Side-by-side
jeepay-manager/pom.xml
View file @
cea60b16
...
...
@@ -129,6 +129,18 @@
<artifactId>
maven-resources-plugin
</artifactId>
</plugin>
<plugin>
<groupId>
com.google.cloud.tools
</groupId>
<artifactId>
jib-maven-plugin
</artifactId>
<configuration>
<container>
<entrypoint>
sh,-c,java $JVM_OPTS -cp $( cat /app/jib-classpath-file ) $( cat /app/jib-main-class-file ) $JAVA_ARGS
</entrypoint>
</container>
</configuration>
</plugin>
</plugins>
</build>
...
...
jeepay-merchant/pom.xml
View file @
cea60b16
...
...
@@ -134,6 +134,18 @@
<artifactId>
maven-resources-plugin
</artifactId>
</plugin>
<plugin>
<groupId>
com.google.cloud.tools
</groupId>
<artifactId>
jib-maven-plugin
</artifactId>
<configuration>
<container>
<entrypoint>
sh,-c,java $JVM_OPTS -cp $( cat /app/jib-classpath-file ) $( cat /app/jib-main-class-file ) $JAVA_ARGS
</entrypoint>
</container>
</configuration>
</plugin>
</plugins>
</build>
...
...
jeepay-payment/pom.xml
View file @
cea60b16
...
...
@@ -146,7 +146,17 @@
<plugin>
<artifactId>
maven-resources-plugin
</artifactId>
</plugin>
<plugin>
<groupId>
com.google.cloud.tools
</groupId>
<artifactId>
jib-maven-plugin
</artifactId>
<configuration>
<container>
<entrypoint>
sh,-c,java $JVM_OPTS -cp $( cat /app/jib-classpath-file ) $( cat /app/jib-main-class-file ) $JAVA_ARGS
</entrypoint>
</container>
</configuration>
</plugin>
</plugins>
</build>
...
...
pom.xml
View file @
cea60b16
...
...
@@ -202,7 +202,11 @@
<build>
<pluginManagement>
<plugins>
<!--引入插件-->
<plugin>
<groupId>
com.google.cloud.tools
</groupId>
<artifactId>
jib-maven-plugin
</artifactId>
<version>
3.2.1
</version>
</plugin>
</plugins>
</pluginManagement>
</build>
...
...
push-to-docker.md
0 → 100644
View file @
cea60b16
1.
编译
```
mvn install
```
2.
构建镜像及推送镜像(不需要docker环境)
```
export DOCKER_REGISTRY=registry.cn-beijing.aliyuncs.com
export DOCKER_NAMESPACE=jeequan
export DOCKER_IMAGE_TAG=v1.0-alpha
export DOCKER_REGISTRY_USERNAME=username1
export DOCKER_REGISTRY_PASSWORD=password1
cd jeepay-payment
mvn jib:build \
-Djib.to.image=$DOCKER_REGISTRY/$DOCKER_NAMESPACE/jeepay-payment:v1.0-alpha \
-Djib.to.auth.username=$DOCKER_REGISTRY_USERNAME \
-Djib.to.auth.password=$DOCKER_REGISTRY_PASSWORD
cd ../jeepay-merchant
mvn jib:build \
-Djib.to.image=$DOCKER_REGISTRY/$DOCKER_NAMESPACE/jeepay-merchant:v1.0-alpha \
-Djib.to.auth.username=$DOCKER_REGISTRY_USERNAME \
-Djib.to.auth.password=$DOCKER_REGISTRY_PASSWORD
cd ../jeepay-manager
mvn jib:build \
-Djib.to.image=$DOCKER_REGISTRY/$DOCKER_NAMESPACE/jeepay-manager:v1.0-alpha \
-Djib.to.auth.username=$DOCKER_REGISTRY_USERNAME \
-Djib.to.auth.password=$DOCKER_REGISTRY_PASSWORD
```
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment