FROM maven:3.8.3-adoptopenjdk-8

ENV TZ=Asia/Shanghai \
    JAVA_OPTS=""
WORKDIR /
ADD settings.xml /root/.m2/settings.xml
ADD pom.xml /pom.xml
RUN mvn package && mvn ibizlabcli:help && git config --global user.name "ibizlabcli" && git config --global user.email "ibizlabcli@ibizsys.net"
ADD ibizlabcli /usr/bin/ibizlabcli

CMD ["/usr/bin/ibizlabcli"]

#docker buildx build --platform linux/arm64,linux/amd64 -t ibiz4j/ibizlab-cli:1.0.2 -t ibiz4j/ibizlab-cli:latest --push .