From 2875f37087f012878d52bfd9698ef05df3f9ed14 Mon Sep 17 00:00:00 2001 From: zeekling Date: Tue, 5 Apr 2022 23:14:48 +0800 Subject: [PATCH] add build.sh --- bolo/Dockerfile | 2 +- bolo/build_docker.sh | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 bolo/build_docker.sh diff --git a/bolo/Dockerfile b/bolo/Dockerfile index 90dca0b..df4e840 100644 --- a/bolo/Dockerfile +++ b/bolo/Dockerfile @@ -2,7 +2,7 @@ FROM maven:3-jdk-8-alpine as MVN_BUILD WORKDIR /opt/bolo/ ADD . /tmp -RUN cd /tmp && mvn package -DskipTests -Pci --settings settings.xml && mv target/bolo/* /opt/bolo/ \ +RUN cd /tmp && mvn package -DskipTests --settings settings.xml && mv target/bolo/* /opt/bolo/ \ && cp -f /tmp/src/main/resources/docker/* /opt/bolo/WEB-INF/classes/ FROM openjdk:8-alpine diff --git a/bolo/build_docker.sh b/bolo/build_docker.sh new file mode 100755 index 0000000..5d6657c --- /dev/null +++ b/bolo/build_docker.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +mkdir -p /tmp/bolo-solo + +cp -rf ./Dockerfile ./gulpfile.js ./manifest.json ./package.json ./pom.xml src /tmp/bolo-solo + +cp -rf ./settings.xml /tmp/bolo-solo + +cd /tmp/bolo-solo && sudo docker build -t "zeek/bolo" .