diff --git a/Others/fastjson/2.0.57/24.03-lts-sp1/Dockerfile b/Others/fastjson/2.0.57/24.03-lts-sp1/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..d4ba29d5120a2eb7cd30d4261066b20eb644e53b --- /dev/null +++ b/Others/fastjson/2.0.57/24.03-lts-sp1/Dockerfile @@ -0,0 +1,35 @@ +ARG BASE=openeuler/openeuler:24.03-lts-sp1 +FROM ${BASE} as BUILDER +ARG TARGETARCH +ARG BUILDARCH +ARG VERSION=2.0.57 +ARG JDK_VERSION=17.0.15_6 + +RUN dnf install -y maven gettext wget \ + && dnf clean all \ + && rm -rf /var/cache/dnf/* + +RUN if [ "$TARGETARCH" = "amd64" ]; then \ + BUILDARCH="x64"; \ + elif [ "$TARGETARCH" = "arm64" ]; then \ + BUILDARCH="aarch64"; \ + fi \ + && cd / \ + && wget https://mirrors.tuna.tsinghua.edu.cn/Adoptium/17/jdk/${BUILDARCH}/linux/OpenJDK17U-jdk_${BUILDARCH}_linux_hotspot_${JDK_VERSION}.tar.gz \ + && tar -zxvf OpenJDK17U-jdk_${BUILDARCH}_linux_hotspot_${JDK_VERSION}.tar.gz \ + && rm -f OpenJDK17U-jdk_${BUILDARCH}_linux_hotspot_${JDK_VERSION}.tar.gz + +ENV JAVA_HOME=/jdk-17.0.15+6 +ENV PATH=${JAVA_HOME}/bin:$PATH +ENV LANG="C.UTF-8" + +WORKDIR /home/fastjson +COPY Fastjson2Demo.java src/main/java/com/example/Fastjson2Demo.java +COPY pom.xml.template pom.xml.template + +ENV FAST_JSON_VERSION=${VERSION} + +RUN envsubst < pom.xml.template > pom.xml \ + && mvn clean compile -Dfile.encoding=UTF-8 + +CMD mvn exec:java -Dexec.mainClass="com.example.Fastjson2Demo" \ No newline at end of file diff --git a/Others/fastjson/2.0.57/24.03-lts-sp1/Fastjson2Demo.java b/Others/fastjson/2.0.57/24.03-lts-sp1/Fastjson2Demo.java new file mode 100644 index 0000000000000000000000000000000000000000..374a639cbafa9d06874476ca082df45c48029fad --- /dev/null +++ b/Others/fastjson/2.0.57/24.03-lts-sp1/Fastjson2Demo.java @@ -0,0 +1,25 @@ +package com.example; + +import com.alibaba.fastjson2.JSON; + +public class Fastjson2Demo { + static class User { + public String name; + public int age; + + public User() {} + public User(String name, int age) { + this.name = name; + this.age = age; + } + } + + public static void main(String[] args) { + User user = new User("张三", 25); + String jsonString = JSON.toJSONString(user); + System.out.println("序列化结果:" + jsonString); + + User parsed = JSON.parseObject(jsonString, User.class); + System.out.println("反序列化结果:" + parsed.name + ", " + parsed.age); + } +} diff --git a/Others/fastjson/2.0.57/24.03-lts-sp1/pom.xml.template b/Others/fastjson/2.0.57/24.03-lts-sp1/pom.xml.template new file mode 100644 index 0000000000000000000000000000000000000000..969fbd9c89fa0b92312d41772a3c7af2d8d10f3f --- /dev/null +++ b/Others/fastjson/2.0.57/24.03-lts-sp1/pom.xml.template @@ -0,0 +1,49 @@ + + + 4.0.0 + + com.example + fastjson2-demo + 1.0-SNAPSHOT + + + UTF-8 + 17 + 17 + + + + + com.alibaba.fastjson2 + fastjson2 + ${FAST_JSON_VERSION} + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + ${maven.compiler.source} + ${maven.compiler.target} + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + com.example.Fastjson2Demo + + + + + + diff --git a/Others/fastjson/README.md b/Others/fastjson/README.md new file mode 100644 index 0000000000000000000000000000000000000000..18a15431805f38f6ce69cb40097f5cded1a1e8be --- /dev/null +++ b/Others/fastjson/README.md @@ -0,0 +1,30 @@ +# Quick reference + +- The official FASTJSON2 docker image. + +- Maintained by: [openEuler CloudNative SIG](https://gitee.com/openeuler/cloudnative). + +- Where to get help: [openEuler CloudNative SIG](https://gitee.com/openeuler/cloudnative), [openEuler](https://gitee.com/openeuler/community). + +# FASTJSON2 | openEuler +Current FASTJSON2 docker images are built on the [openEuler](https://repo.openeuler.org/). This repository is free to use and exempted from per-user rate limits. + +FASTJSON2 is a Java JSON library with excellent performance. + +# Supported tags and respective Dockerfile links +The tag of each `fastjson` docker image is consist of the version of `fastjson` and the version of basic image. The details are as follows +| Tag | Currently | Architectures | +|----------|-------------|------------------| +|[2.0.57-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/fastjson/2.0.57/24.03-lts-sp1/Dockerfile)| FASTJSON2 2.0.57 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + +# Usage +In this usage, users can select the corresponding `{Tag}` based on their requirements. + +- Pull the `openeuler/fastjson` image from docker + + ```bash + docker pull openeuler/fastjson:{Tag} + ``` + +# Question and answering +If you have any questions or want to use some special features, please submit an issue or a pull request on [openeuler-docker-images](https://gitee.com/openeuler/openeuler-docker-images). \ No newline at end of file diff --git a/Others/fastjson/doc/image-info.yml b/Others/fastjson/doc/image-info.yml new file mode 100644 index 0000000000000000000000000000000000000000..b135e3f427d9615cdc5f06b6973225d3414bac81 --- /dev/null +++ b/Others/fastjson/doc/image-info.yml @@ -0,0 +1,33 @@ +name: fastjson +category: others +description: Fastjson2 是阿里巴巴开源的高性能JSON处理库,是Fastjson的下一代版本,专注于提升性能、安全性和对新特性的支持。 +environment: | + 本应用在Docker环境中运行,安装Docker执行如下命令 + ``` + yum install -y docker + ``` +tags: | + fastjson镜像的Tag由其版本信息和基础镜像版本信息组成,详细内容如下 + + | Tag | Currently | Architectures | + |----------|-------------|------------------| + |[2.0.57-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/fastjson/2.0.57/24.03-lts-sp1/Dockerfile)| FastJson2 2.0.57 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + +download: | + 拉取镜像到本地 + ``` + docker pull openeuler/fastjson:{Tag} + ``` + +usage: | + - 启动容器 + ``` + docker run -it --rm openeuler/fastjson:{Tag} + ``` + +license: Apache-2.0 license +similar_packages: + - N/A +dependency: + - java + - maven \ No newline at end of file diff --git a/Others/fastjson/doc/picture/logo.png b/Others/fastjson/doc/picture/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..244e9cc8bdb300e268ed414f54f5212a3e722d76 Binary files /dev/null and b/Others/fastjson/doc/picture/logo.png differ diff --git a/Others/fastjson/meta.yml b/Others/fastjson/meta.yml new file mode 100644 index 0000000000000000000000000000000000000000..e9be4f5bb4738a3dfdb58c500a7ceef5fc877bd9 --- /dev/null +++ b/Others/fastjson/meta.yml @@ -0,0 +1,2 @@ + 2.0.57-oe2403sp1: + path: 2.0.57/24.03-lts-sp1/Dockerfile diff --git a/Others/grpc-server/1.72.0/24.03-lts-sp1/Dockerfile b/Others/grpc-server/1.72.0/24.03-lts-sp1/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..8be4f308edc8df69adde19790350ced66ea6dd30 --- /dev/null +++ b/Others/grpc-server/1.72.0/24.03-lts-sp1/Dockerfile @@ -0,0 +1,19 @@ +ARG BASE=openeuler/openeuler:24.03-lts-sp1 +FROM ${BASE} as BUILDER + +ARG VERSION=1.72.0 +ARG WORK_HOME=/home/grpc-java + +RUN dnf install -y git wget java-1.8.0-openjdk java-1.8.0-openjdk-devel \ + && dnf clean all \ + && rm -rf /var/cache/dnf/* + +RUN git clone -b v${VERSION} --depth 1 https://github.com/grpc/grpc-java ${WORK_HOME} + +WORKDIR ${WORK_HOME}/examples + +RUN ./gradlew installDist + +EXPOSE 50051 + +CMD ["./build/install/examples/bin/hello-world-server"] diff --git a/Others/grpc-server/README.md b/Others/grpc-server/README.md new file mode 100644 index 0000000000000000000000000000000000000000..46eeb57c177309406a23d99cccc73e250cb96272 --- /dev/null +++ b/Others/grpc-server/README.md @@ -0,0 +1,53 @@ +# Quick reference + +- The official Grpc Server docker image. + +- Maintained by: [openEuler CloudNative SIG](https://gitee.com/openeuler/cloudnative). + +- Where to get help: [openEuler CloudNative SIG](https://gitee.com/openeuler/cloudnative), [openEuler](https://gitee.com/openeuler/community). + +# Grpc Server | openEuler +Current Grpc Server docker images are built on the [openEuler](https://repo.openeuler.org/). This repository is free to use and exempted from per-user rate limits. + +In gRPC, a client application can directly call a method on a server application on a different machine as if it were a local object, making it easier for you to create distributed applications and services. +As in many RPC systems, gRPC is based around the idea of defining a service, specifying the methods that can be called remotely with their parameters and return types. +On the server side, the server implements this interface and runs a gRPC server to handle client calls. On the client side, the client has a stub (referred to as just a client in some languages) that provides the same methods as the server. + +Learn more about Grpc Server on [Grpc Website](https://grpc.io/)⁠. + +# Supported tags and respective Dockerfile links +The tag of each `grpc-server` docker image is consist of the version of `grpc-server` and the version of basic image. The details are as follows +| Tag | Currently | Architectures | +|----------|-------------|------------------| +|[1.72.0-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/grpc-server/1.72.0/24.03-lts-sp1/Dockerfile)| Grpc Server 1.72.0 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + +# Usage +In this usage, users can select the corresponding `{Tag}` based on their requirements. + +- Pull the `openeuler/grpc-server` image from docker + + ```bash + docker pull openeuler/grpc-server:{Tag} + ``` + +- Start a grpc-server instance + + ```bash + docker run -d --name my-grpc-server -p 50051:50051 openeuler/grpc-server:{Tag} + ``` + After `my-grpc-server` is started, access the service through `http://localhost:50051`. + +- View container running logs + + ```bash + docker logs -f my-grpc-server + ``` + +- To get an interactive shell + + ```bash + docker run -it --rm openeuler/grpc-server:{Tag} bash + ``` + +# Question and answering +If you have any questions or want to use some special features, please submit an issue or a pull request on [openeuler-docker-images](https://gitee.com/openeuler/openeuler-docker-images). \ No newline at end of file diff --git a/Others/grpc-server/doc/image-info.yml b/Others/grpc-server/doc/image-info.yml new file mode 100644 index 0000000000000000000000000000000000000000..3eb0513ddb342f4454799dd1b1a88948cf7d10a4 --- /dev/null +++ b/Others/grpc-server/doc/image-info.yml @@ -0,0 +1,46 @@ +name: grpc-server +category: others +description: gRPC-server是基于gRPC(Google Remote Procedure Call)框架 的服务端实现,用于处理客户端发来的远程调用请求。 +environment: | + 本应用在Docker环境中运行,安装Docker执行如下命令 + ``` + yum install -y docker + ``` +tags: | + grpc-server镜像的Tag由其版本信息和基础镜像版本信息组成,详细内容如下 + + | Tag | Currently | Architectures | + |----------|-------------|------------------| + |[1.72.0-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/grpc-server/1.72.0/24.03-lts-sp1/Dockerfile)| gRPC-server 1.72.0 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + +download: | + 拉取镜像到本地 + ``` + docker pull openeuler/grpc-server:{Tag} + ``` + +usage: | + - 启动容器 + ``` + docker run -d --name my-grpc-server -p 50051:50051 openeuler/grpc-server:{Tag} + ``` + `my-grpc-server`启动之后,通过`http://localhost:50051`访问服务。 + + - 容器测试 + + 查看运行日志 + ``` + docker logs -f my-grpc-server + ``` + + 运行启动shell会话 + ``` + docker run -it --rm openeuler/grpc-server:{Tag} bash + ``` + +license: Apache-2.0 license +similar_packages: + - Dubbo: 阿里巴巴开源的 RPC 框架,主要用于 Java 服务之间的通信。 +dependency: + - java + - maven \ No newline at end of file diff --git a/Others/grpc-server/doc/picture/logo.png b/Others/grpc-server/doc/picture/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..e29a3541acf1bfc33b7ca2ae2da10024579505bd Binary files /dev/null and b/Others/grpc-server/doc/picture/logo.png differ diff --git a/Others/grpc-server/meta.yml b/Others/grpc-server/meta.yml new file mode 100644 index 0000000000000000000000000000000000000000..1789d5549fa4e4f5d70643e98039dce87c8b4353 --- /dev/null +++ b/Others/grpc-server/meta.yml @@ -0,0 +1,2 @@ +1.72.0-oe2403sp1: + path: 1.72.0/24.03-lts-sp1/Dockerfile diff --git a/Others/image-list.yml b/Others/image-list.yml index f9838c3ecceace08991fa6ad5b600d670ea4cedd..7d0a0c1ee92c7170308acbcae89154d1dbb2907a 100644 --- a/Others/image-list.yml +++ b/Others/image-list.yml @@ -36,3 +36,6 @@ images: solr: solr wildfly: wildfly dubbo: dubbo + fastjson: fastjson + spring-framework: spring-framework + grpc-server: grpc-server diff --git a/Others/spring-framework/6.2.6/24.03-lts-sp1/Dockerfile b/Others/spring-framework/6.2.6/24.03-lts-sp1/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..a8f790792e3e8cb56649d0054a1642ca0fc3a6df --- /dev/null +++ b/Others/spring-framework/6.2.6/24.03-lts-sp1/Dockerfile @@ -0,0 +1,33 @@ +ARG BASE=openeuler/openeuler:24.03-lts-sp1 +FROM ${BASE} as BUILDER + +ARG TARGETARCH +ARG VERSION=6.2.6 +ARG JDK_VERSION=17.0.15_6 + +RUN if [ "$TARGETARCH" = "amd64" ]; then \ + BUILDARCH="x64"; \ + elif [ "$TARGETARCH" = "arm64" ]; then \ + BUILDARCH="aarch64"; \ + fi \ + && cd / \ + && yum install -y wget \ + && wget https://mirrors.tuna.tsinghua.edu.cn/Adoptium/17/jdk/${BUILDARCH}/linux/OpenJDK17U-jdk_${BUILDARCH}_linux_hotspot_${JDK_VERSION}.tar.gz \ + && tar -zxvf OpenJDK17U-jdk_${BUILDARCH}_linux_hotspot_${JDK_VERSION}.tar.gz \ + && rm -f OpenJDK17U-jdk_${BUILDARCH}_linux_hotspot_${JDK_VERSION}.tar.gz + +ENV JAVA_HOME=/jdk-17.0.15+6 +ENV PATH=${JAVA_HOME}/bin:$PATH + +WORKDIR /home/spring-framework +COPY example src/main/java/com/example +COPY pom.xml.template pom.xml.template + +ENV SPRING_VERSION=${VERSION} + +RUN dnf install -y gettext maven \ + && envsubst < pom.xml.template > pom.xml \ + && mvn clean compile dependency:build-classpath -Dmdep.outputFile=target/classpath.txt + +CMD CLASS_PATH="target/classes:$(cat target/classpath.txt)" && \ + java -cp "$CLASS_PATH" com.example.MainApp \ No newline at end of file diff --git a/Others/spring-framework/6.2.6/24.03-lts-sp1/example/AppConfig.java b/Others/spring-framework/6.2.6/24.03-lts-sp1/example/AppConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..2b8cc9866b280afe3580e54aa8997cabe33a66a1 --- /dev/null +++ b/Others/spring-framework/6.2.6/24.03-lts-sp1/example/AppConfig.java @@ -0,0 +1,9 @@ +package com.example; + +import org.springframework.context.annotation.*; + +@Configuration +@ComponentScan("com.example") +public class AppConfig { + +} diff --git a/Others/spring-framework/6.2.6/24.03-lts-sp1/example/HelloService.java b/Others/spring-framework/6.2.6/24.03-lts-sp1/example/HelloService.java new file mode 100644 index 0000000000000000000000000000000000000000..429261eae1dccaf1c159e82076e25cc987b1c333 --- /dev/null +++ b/Others/spring-framework/6.2.6/24.03-lts-sp1/example/HelloService.java @@ -0,0 +1,10 @@ +package com.example; + +import org.springframework.stereotype.Component; + +@Component +public class HelloService { + public void sayHello() { + System.out.println("Hello, Spring Framework!"); + } +} diff --git a/Others/spring-framework/6.2.6/24.03-lts-sp1/example/MainApp.java b/Others/spring-framework/6.2.6/24.03-lts-sp1/example/MainApp.java new file mode 100644 index 0000000000000000000000000000000000000000..c72324b1a41a81b0a537cfa6f8cdb5757e586a43 --- /dev/null +++ b/Others/spring-framework/6.2.6/24.03-lts-sp1/example/MainApp.java @@ -0,0 +1,12 @@ +package com.example; + +import org.springframework.context.annotation.AnnotationConfigApplicationContext; + +public class MainApp { + public static void main(String[] args) { + AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class); + HelloService helloService = context.getBean(HelloService.class); + helloService.sayHello(); + context.close(); + } +} diff --git a/Others/spring-framework/6.2.6/24.03-lts-sp1/pom.xml.template b/Others/spring-framework/6.2.6/24.03-lts-sp1/pom.xml.template new file mode 100644 index 0000000000000000000000000000000000000000..555ade978c768f9eded61903f75b5d3ecb184183 --- /dev/null +++ b/Others/spring-framework/6.2.6/24.03-lts-sp1/pom.xml.template @@ -0,0 +1,44 @@ + + 4.0.0 + + com.example + spring-framework-demo + 1.0-SNAPSHOT + + + 17 + ${SPRING_VERSION} + + + + + + org.springframework + spring-context + ${spring.version} + + + + org.springframework + spring-aop + ${spring.version} + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + ${java.version} + ${java.version} + + + + + diff --git a/Others/spring-framework/README.md b/Others/spring-framework/README.md new file mode 100644 index 0000000000000000000000000000000000000000..03ea708c6e984534562e41132997204ddff03522 --- /dev/null +++ b/Others/spring-framework/README.md @@ -0,0 +1,46 @@ +# Quick reference + +- The official Spring Framework docker image. + +- Maintained by: [openEuler CloudNative SIG](https://gitee.com/openeuler/cloudnative). + +- Where to get help: [openEuler CloudNative SIG](https://gitee.com/openeuler/cloudnative), [openEuler](https://gitee.com/openeuler/community). + +# Spring Framework | openEuler +Current Spring Framework docker images are built on the [openEuler](https://repo.openeuler.org/). This repository is free to use and exempted from per-user rate limits. + +The Spring Framework provides a comprehensive programming and configuration model for modern Java-based enterprise applications - on any kind of deployment platform. + +A key element of Spring is infrastructural support at the application level: Spring focuses on the "plumbing" of enterprise applications so that teams can focus on application-level business logic, without unnecessary ties to specific deployment environments. + +Learn more about Spring Framework on [Spring Framework Website](https://spring.io/projects/spring-framework)⁠. + +# Supported tags and respective Dockerfile links +The tag of each `spring-framework` docker image is consist of the version of `spring-framework` and the version of basic image. The details are as follows +| Tag | Currently | Architectures | +|----------|-------------|------------------| +|[6.2.6-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/spring-framework/6.2.6/24.03-lts-sp1/Dockerfile)| Spring Framework 6.2.6 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + +# Usage +In this usage, users can select the corresponding `{Tag}` based on their requirements. + +- Pull the `openeuler/spring-framework` image from docker + + ```bash + docker pull openeuler/spring-framework:{Tag} + ``` + +- Start a spring-framework instance + ```bash + docker run --rm openeuler/spring-framework:{Tag} + ``` + If instance started successfully you will receive a "Hello, Spring Framework!" reply. + +- To get an interactive shell + + ```bash + docker run -it --rm openeuler/spring-framework:{Tag} bash + ``` + +# Question and answering +If you have any questions or want to use some special features, please submit an issue or a pull request on [openeuler-docker-images](https://gitee.com/openeuler/openeuler-docker-images). \ No newline at end of file diff --git a/Others/spring-framework/doc/image-info.yml b/Others/spring-framework/doc/image-info.yml new file mode 100644 index 0000000000000000000000000000000000000000..2868f52e51cd636511fddf2fb2c54ecadf9d06ca --- /dev/null +++ b/Others/spring-framework/doc/image-info.yml @@ -0,0 +1,44 @@ +name: spring-framework +category: others +description: Spring Framework是一个开源的Java企业级开发框架,最初由Rod Johnson于2003年发布,目的是为了解决J2EE开发中存在的复杂性问题。 +environment: | + 本应用在Docker环境中运行,安装Docker执行如下命令 + ``` + yum install -y docker + ``` +tags: | + spring-framework镜像的Tag由其版本信息和基础镜像版本信息组成,详细内容如下 + + | Tag | Currently | Architectures | + |----------|-------------|------------------| + |[6.2.6-oe2403sp1](https://gitee.com/openeuler/openeuler-docker-images/blob/master/Others/spring-framework/6.2.6/24.03-lts-sp1/Dockerfile)| Spring Framework 6.2.6 on openEuler 24.03-LTS-SP1 | amd64, arm64 | + +download: | + 拉取镜像到本地 + ``` + docker pull openeuler/spring-framework:{Tag} + ``` + +usage: | + - 启动容器 + ``` + docker run -d --name my-spring-framework openeuler/spring-framework:{Tag} + ``` + + - 容器运行 + ``` + docker run --rm openeuler/spring-framework:{Tag} + ``` + 运行成功后回看到`Hello, Spring Framework!` + + - 运行启动shell会话 + ``` + docker run -it --rm openeuler/spring-framework:{Tag} bash + ``` + +license: Apache-2.0 license +similar_packages: + - N/A +dependency: + - java + - maven \ No newline at end of file diff --git a/Others/spring-framework/doc/picture/logo.png b/Others/spring-framework/doc/picture/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..61cd1a4782dfa09c710e8a2b2215b777341a0010 Binary files /dev/null and b/Others/spring-framework/doc/picture/logo.png differ diff --git a/Others/spring-framework/meta.yml b/Others/spring-framework/meta.yml new file mode 100644 index 0000000000000000000000000000000000000000..775ae702dbb8b5174a4c4224c34ac6d3952ee13b --- /dev/null +++ b/Others/spring-framework/meta.yml @@ -0,0 +1,2 @@ +6.2.6-oe2403sp1: + path: 6.2.6/24.03-lts-sp1/Dockerfile