1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
| rm -rf docker/$PROJECT_NAME
mkdir -p docker/$PROJECT_NAME
cp -r target/$PROJECT_NAME-1.0.0.jar docker/$PROJECT_NAME/
cp -r certificate docker/$PROJECT_NAME/
cd docker
cat <<EOF > Dockerfile
FROM harbor.newegg.org/base/openjdk:8-jdk-alpine
RUN apk add --no-cache tini
ENTRYPOINT ["/sbin/tini", "--"]
VOLUME ["/usr/bin/mvn"]
MAINTAINER DAE
COPY $PROJECT_NAME /opt/$PROJECT_NAME
WORKDIR /opt/$PROJECT_NAME
RUN ls /usr/lib/jvm/java-1.8-openjdk/ | echo
RUN ls /opt/$PROJECT_NAME
Run cd /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/ && echo yes | keytool -import -alias NeweggWebGateway -storepass changeit -keystore cacerts -file /opt/$PROJECT_NAME/certificate/PROXY.cer
EXPOSE 8080
CMD ["java", "-jar", "$PROJECT_NAME-1.0.0.jar", \
"--spring.profiles.active=gdev", \
"--server.port=8080", \
"--springfox.documentation.swagger.v2.host=gdev-services.newegg.space/$DISCOVER_ID", \
"--jasypt.encryptor.password=NAT@GDEV"]
EOF
|