我正在尝试配置fabric8 docker-maven-plugin
。
这是我的spring-boot项目结构:
server
├── pom.xml
├── src
│ └── main
│ ├── docker
│ │ └── Dockerfile
│ ├── java
│ │ └── com
│ │ └── jeusdi
│ │ └── ib
│ │ └── wsecsccs
│ │ └── WsecSccsApplication.java
│ └── resources
│ ├── bootstrap.yml
我想启动和停止我的容器。
因此,我创建了一个空的插件配置,但是我不知道如何填充它。
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${fabric8-docker-maven-plugin.version}</version>
<configuration>
<images>
<image>
</image>
</images>
</configuration>
<executions>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
我的Dockerfile
是:
FROM frolvlad/alpine-oraclejdk8:slim
VOLUME /tmp
CMD ["keytool", "-import", "-alias", "vault", "-storepass", "changeit", "-keystore", "$JAVA_HOME/jre/lib/security/cacerts", "-noprompt", "-trustcacerts", "-file", "/var/run/secrets/kubernetes.io/certs/tls.crt"]
ADD wseccloudconfig-0.0.1-SNAPSHOT.jar app.jar
RUN sh -c 'touch /app.jar'
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]
Dockerfile
中加入了src/main/docker
。我应该使用它还是配置pom.xml
描述符?assembly.xml
的用途是什么?