Parcourir la source

update dockerfile & build script

reghao il y a 1 an
Parent
commit
b9d4b9601c
2 fichiers modifiés avec 13 ajouts et 1 suppressions
  1. 1 1
      web/Dockerfile
  2. 12 0
      zzz/build1.sh

+ 1 - 1
web/Dockerfile

@@ -1,4 +1,4 @@
-FROM openjdk:11.0.13-jdk-buster
+FROM adoptopenjdk/openjdk11:x86_64-debianslim-jdk-11.0.24_8-slim
 
 WORKDIR /app
 RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone

+ 12 - 0
zzz/build1.sh

@@ -0,0 +1,12 @@
+#!/bin/bash
+
+cd /home/reghao/code/java/bnt
+commit_id=`git rev-parse HEAD | cut -c 1-8`
+#docker_prefix='docker.reghao.cn/tnb'
+docker_prefix='registry.cn-chengdu.aliyuncs.com/reghao/bntweb'
+
+mvn clean package -Dmaven.test.skip=true -am -pl web
+
+cd /home/reghao/code/java/bnt/web
+docker build -t ${docker_prefix}:${commit_id} .
+docker push ${docker_prefix}:${commit_id}