命令clean package -Dmaven.test.skip=true
还有一种是跳过test的命令:package -DskipTests
image.png
这个写在:
image.png
docker rm -f zencloud-admin-console-j2ee
sleep 1
docker image prune -af
sleep 1
tee zencloud-admin-console-j2ee/run.sh <<-'EOF'
#!/bin/bash
nohup java -jar run.jar > /data/logs/run.log 2>&1
EOF
tee zencloud-admin-console-j2ee/Dockerfile <<-'EOF'
FROM java:latest
RUN mkdir -p /data
WORKDIR /data
COPY platform-admin-1.0-SNAPSHOT-exec.jar /data/run.jar
COPY run.sh /data/run.sh
RUN chmod +x /data/run.sh
CMD ["sh", "/data/run.sh"]
EOF
docker build zencloud-admin-console-j2ee/ -t zencloud-admin-console-j2ee
docker run -d -p 8001:8083 --name zencloud-admin-console-j2ee -v /root/zencloud-admin-console-j2ee/logs:/data/logs/ zencloud-admin-console-j2ee
网友评论