forked from meissa/ModeratorElection
Some further docker image steps
This commit is contained in:
parent
8ae0416f0c
commit
a0691894ac
4 changed files with 19 additions and 21 deletions
|
@ -60,6 +60,8 @@ java {
|
||||||
graalvmNative {
|
graalvmNative {
|
||||||
binaries {
|
binaries {
|
||||||
main {
|
main {
|
||||||
|
mainClass = 'com.ModeratoElection.MEApplication'
|
||||||
|
fallback = false
|
||||||
imageName.set('ModeratorElection')
|
imageName.set('ModeratorElection')
|
||||||
javaLauncher.set(javaToolchains.launcherFor {
|
javaLauncher.set(javaToolchains.launcherFor {
|
||||||
languageVersion.set(JavaLanguageVersion.of(17))
|
languageVersion.set(JavaLanguageVersion.of(17))
|
||||||
|
|
2
build.py
2
build.py
|
@ -16,7 +16,7 @@ def initialize(project):
|
||||||
|
|
||||||
input = {
|
input = {
|
||||||
"name": name,
|
"name": name,
|
||||||
"module": "notused",
|
"module": "vaadin_fullstack",
|
||||||
"stage": "notused",
|
"stage": "notused",
|
||||||
"project_root_path": PROJECT_ROOT_PATH,
|
"project_root_path": PROJECT_ROOT_PATH,
|
||||||
"build_types": ["IMAGE"],
|
"build_types": ["IMAGE"],
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#Build Stage
|
#Build Stage
|
||||||
FROM node:22.3.0-bookworm-slim
|
FROM ubuntu:noble-20240605
|
||||||
|
|
||||||
ADD resources /tmp
|
ADD resources /tmp
|
||||||
RUN /tmp/install.sh
|
RUN /tmp/install.sh
|
||||||
|
ENV LANG=en_US.UTF-8 \
|
||||||
|
JAVA_HOME=/usr/lib/jvm/graalvm
|
||||||
|
|
|
@ -10,7 +10,6 @@ function main()
|
||||||
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
|
||||||
#cp /tmp/MEMBERNAMES /usr/local/src/ModeratorElection
|
|
||||||
|
|
||||||
#download gradle
|
#download gradle
|
||||||
#gradle_version="8.4"
|
#gradle_version="8.4"
|
||||||
|
@ -28,26 +27,24 @@ function main()
|
||||||
#curl -SsLo /tmp/graalvm-community-jdk.tar.gz https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${graalvm_jdk_version}/graalvm-community-jdk-${graalvm_jdk_version}_linux-x64_bin.tar.gz
|
#curl -SsLo /tmp/graalvm-community-jdk.tar.gz https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${graalvm_jdk_version}/graalvm-community-jdk-${graalvm_jdk_version}_linux-x64_bin.tar.gz
|
||||||
#curl -SsLo /tmp/graalvm-checksum https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${graalvm_jdk_version}/graalvm-community-jdk-${graalvm_jdk_version}_linux-x64_bin.tar.gz.sha256
|
#curl -SsLo /tmp/graalvm-checksum https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-${graalvm_jdk_version}/graalvm-community-jdk-${graalvm_jdk_version}_linux-x64_bin.tar.gz.sha256
|
||||||
|
|
||||||
#checksum gradle, graalvm
|
#checksum graalvm
|
||||||
checksum
|
checksum
|
||||||
|
|
||||||
#install gradle
|
#install graalvm
|
||||||
#mkdir /opt/gradle
|
mkdir /usr/lib/jvm/
|
||||||
#unzip -qqd /opt/gradle /tmp/gradle-${gradle_version}-bin.zip
|
tar -C /usr/lib/jvm/ -xzf /tmp/graalvm-jdk-${graalvm_JDK_version}_linux-x64_bin.tar.gz
|
||||||
#export PATH=$PATH:/opt/gradle/gradle-${gradle_version}/bin
|
|
||||||
|
|
||||||
#install graalvm -- ToDo: need to be checked, graalvm after installing available as default-jvm?
|
|
||||||
tar -C /usr/lib/jvm/ -xzf graalvm-jdk-${graalvm_JDK_version}_linux-x64_bin.tar.gz
|
|
||||||
dirname_graalvm=$(ls /usr/lib/jvm/|grep -e graa)
|
dirname_graalvm=$(ls /usr/lib/jvm/|grep -e graa)
|
||||||
ln -s /usr/lib/jvm/$dirname_graalvm /usr/lib/jvm/graalvm
|
ln -s /usr/lib/jvm/$dirname_graalvm /usr/lib/jvm/graalvm
|
||||||
ln -s /usr/lib/jvm/graalvm/bin/gu /usr/local/bin
|
ln -s /usr/lib/jvm/graalvm/bin/gu /usr/local/bin
|
||||||
update-alternatives --install /usr/bin/java java /usr/lib/jvm/graalvm/bin/java 2
|
update-alternatives --install /usr/bin/java java /usr/lib/jvm/graalvm/bin/java 0
|
||||||
|
|
||||||
|
echo "export PATH=$PATH:/usr/lib/jvm/$dirname_graalvm/lib/svm/bin"|tee -a /root/.bashrc
|
||||||
|
#possibility to install js, node.js,... to graalvm using "gu"
|
||||||
|
#"gu available" shows available components, native-image is one part of it
|
||||||
|
echo "export PATH=$PATH:/usr/lib/jvm/graalvm-jdk-17.0.11+7.1/lib/installer/bin/gu"|tee -a /root/.bashrc
|
||||||
|
/usr/lib/jvm/$dirname_graalvm/lib/svm/bin/native-image --version
|
||||||
|
|
||||||
|
|
||||||
#ToDo install by graalvm, put graalvm binary here
|
|
||||||
#install -m 0700 /tmp/entrypoint-start-and-wait.sh /
|
#install -m 0700 /tmp/entrypoint-start-and-wait.sh /
|
||||||
|
|
||||||
#install -m 0700 /tmp/init.sh /usr/local/bin/
|
#install -m 0700 /tmp/init.sh /usr/local/bin/
|
||||||
#install -m 0700 /tmp/backup.sh /usr/local/bin/
|
#install -m 0700 /tmp/backup.sh /usr/local/bin/
|
||||||
#install -m 0700 /tmp/restore.sh /usr/local/bin/
|
#install -m 0700 /tmp/restore.sh /usr/local/bin/
|
||||||
|
@ -57,13 +54,9 @@ function main()
|
||||||
} #> /dev/null
|
} #> /dev/null
|
||||||
|
|
||||||
function checksum() {
|
function checksum() {
|
||||||
#gradle
|
|
||||||
#echo " /tmp/gradle-${gradle_version}-bin.zip"|tee -a /tmp/gradle-${gradle_version}-bin.zip.sha256
|
|
||||||
#sha256sum -c --status /tmp/gradle-${gradle_version}-bin.zip.sha256
|
|
||||||
|
|
||||||
#graalvm
|
#graalvm
|
||||||
echo " /tmp/graalvm-jdk-${graalvm_JDK_version}_linux-x64_bin.tar.gz"|tee -a /tmp/graalvm-jdk-${graalvm_JDK_version}_linux-x64_bin.tar.gz.sha256
|
echo " /tmp/graalvm-jdk-${graalvm_JDK_version}_linux-x64_bin.tar.gz"|tee -a /tmp/graalvm-jdk-${graalvm_JDK_version}_linux-x64_bin.tar.gz.sha256
|
||||||
sha256sum -c --status graalvm-jdk-${graalvm_JDK_version}_linux-x64_bin.tar.gz.sha256
|
sha256sum -c --status /tmp/graalvm-jdk-${graalvm_JDK_version}_linux-x64_bin.tar.gz.sha256
|
||||||
}
|
}
|
||||||
|
|
||||||
source /tmp/install_functions_debian.sh
|
source /tmp/install_functions_debian.sh
|
||||||
|
@ -74,3 +67,5 @@ DEBIAN_FRONTEND=noninteractive DEBCONF_NOWARNINGS=yes main
|
||||||
#npm audit fix
|
#npm audit fix
|
||||||
#npm ci --omit=dev
|
#npm ci --omit=dev
|
||||||
#./gradlew build
|
#./gradlew build
|
||||||
|
cd /usr/local/src/ModeratorElection/
|
||||||
|
./gradlew clean build -Pvaadin.productionMode -x processTestAot
|
||||||
|
|
Loading…
Reference in a new issue