diff --git a/Others/spring-boot/3.5.5/24.03-lts-sp1/Application.java b/Others/spring-boot/3.5.5/24.03-lts-sp1/Application.java new file mode 100644 index 0000000000000000000000000000000000000000..7674a4b76ee805a957275dbc8ef84c47b8209018 --- /dev/null +++ b/Others/spring-boot/3.5.5/24.03-lts-sp1/Application.java @@ -0,0 +1,19 @@ +package com.spring.boot; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.web.bind.annotation.*; + +@SpringBootApplication +@RestController +public class Application { + + @RequestMapping("/") + public String home() { + return "Hello World!"; + } + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } +} \ No newline at end of file diff --git a/Others/spring-boot/3.5.5/24.03-lts-sp1/Dockerfile b/Others/spring-boot/3.5.5/24.03-lts-sp1/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..da153afef7bd4a3231d58d717d5d25d65c1d2fd4 --- /dev/null +++ b/Others/spring-boot/3.5.5/24.03-lts-sp1/Dockerfile @@ -0,0 +1,43 @@ +ARG BASE=openeuler/openeuler:24.03-lts-sp2 +FROM ${BASE} as Builder +ARG VERSION=3.5.5 + +RUN dnf update -y \ + && dnf install -y wget gettext java-17-openjdk java-17-openjdk-devel \ + && dnf clean all \ + && rm -rf /var/run/cache/* + +ARG MAVEN_VERSION=3.9.11 +RUN wget https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz \ + && mkdir -p /usr/local/maven \ + && tar -zxvf apache-maven-3.9.11-bin.tar.gz -C /usr/local/maven --strip-components=1 + +ENV PATH=/usr/local/maven/bin:$PATH + +COPY Application.java /spring-boot/src/main/java/com/spring/boot/Application.java +COPY pom.xml.template /spring-boot/pom.xml.template + +ENV SPRING_BOOT_VERSION=${VERSION} + +WORKDIR spring-boot + +RUN envsubst < pom.xml.template > pom.xml \ + && mvn clean install package -Dmaven.test.skip + + +FROM ${BASE} + +RUN yum update -y \ + && yum install -y wget java-17-openjdk + +ENV WORKSPACE=/home/spring-boot + +WORKDIR ${WORKSPACE} + +COPY --chown=spring-boot --from=Builder /spring-boot/target ${WORKSPACE}/target + +ENV LANG="C.UTF-8" + +EXPOSE 8080 + +CMD java -jar ${WORKSPACE}/target/demo-1.0.jar \ No newline at end of file diff --git a/Others/spring-boot/3.5.5/24.03-lts-sp1/pom.xml.template b/Others/spring-boot/3.5.5/24.03-lts-sp1/pom.xml.template new file mode 100644 index 0000000000000000000000000000000000000000..f32839de9b84c6fa6bfaf577cf1257717a52b523 --- /dev/null +++ b/Others/spring-boot/3.5.5/24.03-lts-sp1/pom.xml.template @@ -0,0 +1,53 @@ + + + 4.0.0 + + + org.springframework.boot + spring-boot-starter-parent + ${SPRING_BOOT_VERSION} + + + + com.spring.boot + demo + 1.0 + + + + org.springframework.boot + spring-boot-starter-web + + + + + + + org.springframework.boot + spring-boot-maven-plugin + 3.4.4 + + + + repackage + + + + + com.spring.boot.Application + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.10.1 + + 17 + 17 + + + + + \ No newline at end of file diff --git a/Others/spring-boot/README.md b/Others/spring-boot/README.md index 797e9fbd2fa79f7e4b433b2be703f8bf37509700..51fa3eb7200d5bcdd0291249db92497436a5c0c1 100644 --- a/Others/spring-boot/README.md +++ b/Others/spring-boot/README.md @@ -18,6 +18,7 @@ The tag of each `spring-boot` docker image is consist of the version of `spring- | Tag | Currently | Architectures | |--------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------|---------------| +|[3.5.5-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/spring-boot/3.5.5/24.03-lts-sp1/Dockerfile) | spring 3.5.5 on openEuler 24.03-LTS-SP1 | amd64, arm64 | | [3.4.4-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/spring-boot/3.4.4/24.03-lts-sp1/Dockerfile) | Spring Boot 3.4.4 on openEuler 24.03-LTS-SP1 | amd64, arm64 | | [3.5.4-oe2403sp2](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/spring-boot/3.5.4/24.03-lts-sp2/Dockerfile) | Spring Boot 3.5.4 on openEuler 24.03-LTS-SP2 | amd64, arm64 | diff --git a/Others/spring-boot/doc/image-info.yml b/Others/spring-boot/doc/image-info.yml index be370560899d6d653ba9a94c7229a964a13bc384..0d21e61bdf2a34a91cad69349d027b27fc4e1e32 100644 --- a/Others/spring-boot/doc/image-info.yml +++ b/Others/spring-boot/doc/image-info.yml @@ -11,6 +11,7 @@ tags: | | Tag | Currently | Architectures | |--------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------|---------------| + |[3.5.5-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/spring-boot/3.5.5/24.03-lts-sp1/Dockerfile) | spring 3.5.5 on openEuler 24.03-LTS-SP1 | amd64, arm64 | | [3.4.4-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/spring-boot/3.4.4/24.03-lts-sp1/Dockerfile) | Spring Boot 3.4.4 on openEuler 24.03-LTS-SP1 | amd64, arm64 | | [3.5.4-oe2403sp2](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/spring-boot/3.5.4/24.03-lts-sp2/Dockerfile) | Spring Boot 3.5.4 on openEuler 24.03-LTS-SP2 | amd64, arm64 | diff --git a/Others/spring-boot/meta.yml b/Others/spring-boot/meta.yml index d289ad837c60e91660d6ca3435c9d43bb65b5b85..d496158a64d780fbcf129258d2bffbee769312b5 100644 --- a/Others/spring-boot/meta.yml +++ b/Others/spring-boot/meta.yml @@ -2,3 +2,6 @@ path: 3.4.4/24.03-lts-sp1/Dockerfile 3.5.4-oe2403sp2: path: 3.5.4/24.03-lts-sp2/Dockerfile + +3.5.5-oe2403sp1: + path: 3.5.5/24.03-lts-sp1/Dockerfile \ No newline at end of file