From e80fb3bade9224fdf2c768a643f7d75a331bc683 Mon Sep 17 00:00:00 2001 From: kaixiliu Date: Mon, 17 Jun 2024 10:00:26 +0800 Subject: Add Dockerfile Issue-ID: USECASEUI-838 Change-Id: I519549d1180cf8e72c8a4ecb5d7e4f7ef9d4a5bb Signed-off-by: kaixiliu --- llm-adaptation/pom.xml | 29 ++++- pom.xml | 1 + standalone/pom.xml | 192 ++++++++++++++++++++++++++++++++ standalone/src/main/assembly/Dockerfile | 18 +++ 4 files changed, 239 insertions(+), 1 deletion(-) create mode 100644 standalone/pom.xml create mode 100644 standalone/src/main/assembly/Dockerfile diff --git a/llm-adaptation/pom.xml b/llm-adaptation/pom.xml index 8917255..74ff409 100644 --- a/llm-adaptation/pom.xml +++ b/llm-adaptation/pom.xml @@ -68,5 +68,32 @@ lombok - + + + + org.springframework.boot + spring-boot-maven-plugin + 3.0.11 + + true + + + + + repackage + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + 17 + 17 + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 5d7fd53..0a06ef9 100644 --- a/pom.xml +++ b/pom.xml @@ -31,6 +31,7 @@ pom llm-adaptation + standalone diff --git a/standalone/pom.xml b/standalone/pom.xml new file mode 100644 index 0000000..0aae140 --- /dev/null +++ b/standalone/pom.xml @@ -0,0 +1,192 @@ + + + 4.0.0 + + org.onap.usecase-ui.llm-adaptation + usecase-ui-llm-adaptation-parent + 1.0-SNAPSHOT + + + standalone + 1.0-SNAPSHOT + + + 1.0 + 17 + UTF-8 + UTF-8 + yyyyMMdd'T'HHmmss'Z' + target/assembly/linux64 + target/version/${adaptation.version} + + + + + + org.onap.usecase-ui.llm-adaptation + usecase-ui-llm-adaptation + ${project.version} + + + + + + usecse-ui-llm-adaptation + + + org.apache.maven.plugins + maven-resources-plugin + + + copy-resources-linux64 + process-resources + + copy-resources + + + ${linux64outputdir} + + + src/main/assembly/ + false + + **/* + + + Dockerfile + + + + true + + + + copy-dockerfile + process-resources + + copy-resources + + + ${dockeroutput} + + + src/main/assembly/ + false + + Dockerfile + + + + true + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + copy-jar-linux64 + + copy + + prepare-package + + + + org.onap.usecase-ui.llm-adaptation + usecase-ui-llm-adaptation + jar + true + ${linux64outputdir} + usecase-ui-llm-adaptation.jar + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + distribution + package + + run + + + + + + + + + + + + + + + + + + + + + + + docker + + + + io.fabric8 + docker-maven-plugin + 0.16.5 + false + + + + onap/usecase-ui-llm-adaptation + + try + ${basedir}/${dockeroutput} + ${basedir}/${dockeroutput}/Dockerfile + + ${adaptation.version}-SNAPSHOT-latest + ${adaptation.version}-STAGING-latest + ${adaptation.version}-STAGING-${maven.build.timestamp} + + + + + + + + generate-images + package + + build + + + + push-images + deploy + + build + push + + + + + + + + + \ No newline at end of file diff --git a/standalone/src/main/assembly/Dockerfile b/standalone/src/main/assembly/Dockerfile new file mode 100644 index 0000000..bfd5ede --- /dev/null +++ b/standalone/src/main/assembly/Dockerfile @@ -0,0 +1,18 @@ +FROM nexus3.onap.org:10001/onap/integration-java17:12.0.0 + +USER root + +RUN mkdir /home/uui + +ADD usecase-ui-llm-adaptation-*-linux64.tar.gz /home/uui/ + +WORKDIR /home/uui + +EXPOSE 8084 + +RUN addgroup -S uui && adduser -S uui -G uui && chown -R uui:uui /home/uui + +USER uui +WORKDIR /home/uui +ENTRYPOINT ["sh", "-c"] +CMD ["exec java -jar /home/uui/usecase-ui-llm-adaptation-linux64.jar"] \ No newline at end of file -- cgit 1.2.3-korg