forked from meissa/ModeratorElection
binary compilation in image successfully
This commit is contained in:
parent
1b598653d0
commit
9f8d433106
4 changed files with 21 additions and 13 deletions
|
@ -12,6 +12,8 @@ plugins {
|
||||||
id 'com.vaadin' version '24.3.3'
|
id 'com.vaadin' version '24.3.3'
|
||||||
id 'org.graalvm.buildtools.native' version '0.10.2'
|
id 'org.graalvm.buildtools.native' version '0.10.2'
|
||||||
}
|
}
|
||||||
|
group = 'com.ModeratorElection'
|
||||||
|
version = '0.0.1-SNAPSHOT'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
|
@ -41,6 +41,10 @@ build graalvm binary
|
||||||
./gradlew nativeCompile failed, need for some improvements!
|
./gradlew nativeCompile failed, need for some improvements!
|
||||||
./gradlew nativeCompile -Dvaadin.productionMode=true
|
./gradlew nativeCompile -Dvaadin.productionMode=true
|
||||||
|
|
||||||
|
```
|
||||||
|
```
|
||||||
|
gu available
|
||||||
|
https://docs.oracle.com/en/graalvm/enterprise/21/docs/reference-manual/graalvm-updater/#component-installation
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#Build Stage
|
#Build Stage
|
||||||
FROM ubuntu:noble-20240605 as build-env
|
FROM node:22-bookworm-slim as build-env
|
||||||
|
|
||||||
ADD resources /tmp
|
ADD resources /tmp
|
||||||
RUN /tmp/install.sh
|
RUN /tmp/install.sh
|
||||||
|
@ -16,11 +16,13 @@ RUN apt-get -qqy upgrade
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
CMD ["mkdir /usr/local/src/ModeratorElection"]
|
CMD ["mkdir /usr/local/src/ModeratorElection"]
|
||||||
WORKDIR /usr/local/src/ModeratorElection/
|
WORKDIR /usr/local/src/ModeratorElection/
|
||||||
#copy jar
|
|
||||||
#COPY --from=build-env /usr/local/src/ModeratorElection/build/libs/ModeratorElection.jar .
|
|
||||||
#copy graalvm binary
|
|
||||||
COPY --chmod=0700 --from=build-env /usr/local/src/ModeratorElection/build/native/ModeratorElection .
|
|
||||||
|
|
||||||
|
#*SNAPSHOT should be part of the name, asterisk for continueing versionnumber
|
||||||
|
#copy jar
|
||||||
|
#COPY --from=build-env /usr/local/src/ModeratorElection/build/libs/ModeratorElection.jar ./ModeratorElection.jar
|
||||||
|
#copy graalvm binary
|
||||||
|
COPY --from=build-env /usr/local/src/ModeratorElection/build/native/nativeCompile/ModeratorElection .
|
||||||
|
CMD ["chmod +x ModerationElection"]
|
||||||
#ENV MEMBERNAMES
|
#ENV MEMBERNAMES
|
||||||
#ENTRYPOINT ["java", "-jar", "ModeratorElection.jar"]
|
#ENTRYPOINT ["java", "-jar", "ModeratorElection.jar"]
|
||||||
ENTRYPOINT ["ModeratorElection"]
|
ENTRYPOINT ["ModeratorElection"]
|
|
@ -7,7 +7,7 @@ function main()
|
||||||
upgradeSystem
|
upgradeSystem
|
||||||
#openjdk-17-jdk-headless, no need, we are installing graalvm
|
#openjdk-17-jdk-headless, no need, we are installing graalvm
|
||||||
#unzpip only necessary for gradle installation within main()
|
#unzpip only necessary for gradle installation within main()
|
||||||
apt-get -qqy install git curl
|
apt-get -qqy install git curl build-essential libz-dev zlib1g-dev
|
||||||
mkdir /usr/local/src/ModeratorElection
|
mkdir /usr/local/src/ModeratorElection
|
||||||
#change to main branch for production
|
#change to main branch for production
|
||||||
git clone --single-branch --branch MEapp-development https://repo.prod.meissa.de/meissa/ModeratorElection.git /usr/local/src/ModeratorElection
|
git clone --single-branch --branch MEapp-development https://repo.prod.meissa.de/meissa/ModeratorElection.git /usr/local/src/ModeratorElection
|
||||||
|
@ -46,6 +46,7 @@ function main()
|
||||||
/usr/lib/jvm/$dirname_graalvm/lib/svm/bin/native-image --version
|
/usr/lib/jvm/$dirname_graalvm/lib/svm/bin/native-image --version
|
||||||
|
|
||||||
cleanupDocker
|
cleanupDocker
|
||||||
|
|
||||||
} #> /dev/null
|
} #> /dev/null
|
||||||
|
|
||||||
function checksum() {
|
function checksum() {
|
||||||
|
@ -57,13 +58,12 @@ function checksum() {
|
||||||
source /tmp/install_functions_debian.sh
|
source /tmp/install_functions_debian.sh
|
||||||
DEBIAN_FRONTEND=noninteractive DEBCONF_NOWARNINGS=yes main
|
DEBIAN_FRONTEND=noninteractive DEBCONF_NOWARNINGS=yes main
|
||||||
|
|
||||||
#cd /usr/local/src/ModeratorElection
|
|
||||||
npm install -g npm@latest
|
|
||||||
npm audit fix --force
|
|
||||||
#npm ci --omit=dev
|
|
||||||
#./gradlew build
|
|
||||||
cd /usr/local/src/ModeratorElection/
|
cd /usr/local/src/ModeratorElection/
|
||||||
|
#npm install -g npm@latest
|
||||||
|
#npm audit fix
|
||||||
|
#npm ci --omit=dev
|
||||||
|
|
||||||
#build jar
|
#build jar
|
||||||
./gradlew clean build -Pvaadin.productionMode -x processTestAot
|
#./gradlew clean build -Pvaadin.productionMode -x processTestAot
|
||||||
#build graalvm binary
|
#build graalvm binary
|
||||||
./gradlew nativeCompile
|
./gradlew nativeCompile -Dvaadin.productionMode=true
|
||||||
|
|
Loading…
Reference in a new issue