From fef24bfdd8a5a9406da07b71400d29cf860eae2b Mon Sep 17 00:00:00 2001 From: wjunLu Date: Tue, 19 Mar 2024 11:07:41 +0800 Subject: [PATCH 1/4] Add dotnet-runtime docker image. --- dotnet-runtime/8.0.3/22.03-lts-sp3/Dockerfile | 20 ++++ dotnet-runtime/README.md | 30 ++++++ dotnet-runtime/doc/image-info.yml | 88 ++++++++++++++++++ dotnet-runtime/doc/picture/logo.png | Bin 0 -> 1357 bytes dotnet-runtime/meta.yml | 2 + 5 files changed, 140 insertions(+) create mode 100644 dotnet-runtime/8.0.3/22.03-lts-sp3/Dockerfile create mode 100644 dotnet-runtime/README.md create mode 100644 dotnet-runtime/doc/image-info.yml create mode 100644 dotnet-runtime/doc/picture/logo.png create mode 100644 dotnet-runtime/meta.yml diff --git a/dotnet-runtime/8.0.3/22.03-lts-sp3/Dockerfile b/dotnet-runtime/8.0.3/22.03-lts-sp3/Dockerfile new file mode 100644 index 0000000..fea737d --- /dev/null +++ b/dotnet-runtime/8.0.3/22.03-lts-sp3/Dockerfile @@ -0,0 +1,20 @@ +ARG BASE=openeuler/openeuler:22.03-lts-sp3 +FROM ${BASE} + +ARG TARGETARCH +ARG BUILDARCH +ARG VERSION=8.0.3 + +RUN if [ "$TARGETARCH" = "amd64" ]; then \ + BUILDARCH="x64"; \ + elif [ "$TARGETARCH" = "arm64" ]; then \ + BUILDARCH="arm64"; \ + fi && \ + curl -fSL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/${VERSION}/dotnet-runtime-${VERSION}-linux-${BUILDARCH}.tar.gz && \ + mkdir -p /dotnet && tar -zxvf dotnet.tar.gz -C /dotnet && \ + mv /dotnet /usr/share/dotnet && \ + rm -f dotnet.tar.gz + +RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet + +CMD [ "dotnet", "--info" ] diff --git a/dotnet-runtime/README.md b/dotnet-runtime/README.md new file mode 100644 index 0000000..e41d8fc --- /dev/null +++ b/dotnet-runtime/README.md @@ -0,0 +1,30 @@ +# Dotnet-runtime + +# Quick reference + +- The official dotnet-runtime 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) + +# Build reference + +1. Build images and push: +```shell +docker buildx build -t "openeuler/dotnet-runtime:$TAG" --platform linux/amd64,linux/arm64 . --push +``` + +We are using `buildx` in here to generate multi-arch images, see more in [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/) + +2. Run: +```shell +docker run -d -name dotnet-runtime openeuler/dotnet-runtime:$TAG +``` + +# Supported tags and respective Dockerfile links + +- 8.0.3-oe2203sp3: dotnet-runtime v8.0.3, openEuler 22.03 LTS SP3 + +## Operating System +Linux/Unix, ARM64 or x86-64 architecture. diff --git a/dotnet-runtime/doc/image-info.yml b/dotnet-runtime/doc/image-info.yml new file mode 100644 index 0000000..6e84d46 --- /dev/null +++ b/dotnet-runtime/doc/image-info.yml @@ -0,0 +1,88 @@ +name: dotnet-runtime +category: cloud +description: Dotnet Runtime (.NET Runtime)是一个运行时环境,用于执行基于.NET平台的应用程序。它提供了必要的组件和功能,使得.NET应用程序能够在特定的操作系统上运行。 +environment: | + 本应用以容器镜像的方式供用户使用,运行于预置docker的Linux环境。Docker的推荐安装方式如下: + ## apt安装 + ### 1.更新系统软件包依赖 + ``` + sudo spt update + sudo apt install ca-certificates curl gnupg lsb-release + ``` + ### 2.添加Docker官方GPG密钥 + ``` + sudo mkdir -p /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg + sudo chmod a+r /etc/apt/keyrings/docker.gpg + ``` + ### 3.添加Docker官方APT源 + ``` + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + ``` + ### 4.再次更新软件包索引 + ``` + sudo apt update + ``` + ### 5.安装Docker + ``` + sudo apt install docker-ce docker-ce-cli containerd.io + ``` + + ## yum安装 + ### 1.安装yum-utils + ``` + sudo yum install -y yum-utils + ``` + ### 2.添加Docker源 + ``` + sudo yum-config-manager \ + > --add-repo \ + > https://download.docker.com/linux/centos/docker-ce.repo + ``` + ### 3.安装Docker + ``` + sudo yum install -y docker-ce docker-ce-cli containerd.io + ``` + + 注意,在openEuler环境安装docker时,可执行如下命令一键安装 + ``` + yum install -y docker + ``` + + ## 脚本安装 + ### 1.下载安装脚本 + ``` + curl -fsSL https://get.docker.com -o get-docker.sh + ``` + ### 2.使用root权限执行脚本 + ``` + sudo sh get-docker.sh + ``` + 使用脚本安装方式时,如果用户要指定安装的docker版本,需要自行修改`get-docker.sh`的源码内容。 + + ## 验证 + ``` + sudo docker run hello-world + ``` + +download: " + 获取容器镜像 + ``` + docker pull openeuler/dotnet-runtime:{TAG} + ``` + " +install: " + 启动容器 + ``` + docker run -d --name dotnet-runtime openeuler/dotnet-runtime:{TAG} + ``` + 用户可根据自身需求,自定义启动选项。 + " +license: MIT license +similar_packages: + - Java Runtime Environment (JRE): JRE是用于执行基于Java平台的应用程序的运行时环境。它提供了类似的功能,包括字节码解释和执行、垃圾回收、异常处理等。 + - Python Runtime: Python运行时是用于执行基于Python编程语言的应用程序的环境。它提供了解释和执行Python脚本的功能,并提供了许多标准库和扩展库,用于各种计算和应用开发。 + - Node.js Runtime: Node.js是一个基于Chrome V8引擎的JavaScript运行时。它允许使用JavaScript编写服务器端的应用程序,并提供了许多内置的库和模块,用于处理网络请求、文件系统访问等任务。 + - Go Runtime: Go是一种编程语言,Go运行时用于执行基于Go语言编写的应用程序。它提供了垃圾回收、协程(goroutine)管理、并发编程等功能,使得Go语言应用程序能够高效地运行。 +dependency: + - .NET Core \ No newline at end of file diff --git a/dotnet-runtime/doc/picture/logo.png b/dotnet-runtime/doc/picture/logo.png new file mode 100644 index 0000000000000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#7bxa~5Gc_eDB&&ex_Q z2dq@D=^$>l&CM1QH}3^2IC=8mTY)}S8DT;cMEid+_WxYX80!N7K&k9uUd`SBU@A^- O65x*Xa&19;_wXMK` Date: Tue, 19 Mar 2024 03:41:51 +0000 Subject: [PATCH 2/4] update dotnet-runtime/8.0.3/22.03-lts-sp3/Dockerfile. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 鲁卫军 --- dotnet-runtime/8.0.3/22.03-lts-sp3/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dotnet-runtime/8.0.3/22.03-lts-sp3/Dockerfile b/dotnet-runtime/8.0.3/22.03-lts-sp3/Dockerfile index fea737d..07da6ce 100644 --- a/dotnet-runtime/8.0.3/22.03-lts-sp3/Dockerfile +++ b/dotnet-runtime/8.0.3/22.03-lts-sp3/Dockerfile @@ -10,7 +10,8 @@ RUN if [ "$TARGETARCH" = "amd64" ]; then \ elif [ "$TARGETARCH" = "arm64" ]; then \ BUILDARCH="arm64"; \ fi && \ - curl -fSL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/${VERSION}/dotnet-runtime-${VERSION}-linux-${BUILDARCH}.tar.gz && \ + yum update -y && yum install -y wget && yum clean all && \ + wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/${VERSION}/dotnet-runtime-${VERSION}-linux-${BUILDARCH}.tar.gz && \ mkdir -p /dotnet && tar -zxvf dotnet.tar.gz -C /dotnet && \ mv /dotnet /usr/share/dotnet && \ rm -f dotnet.tar.gz -- Gitee From c7868a2269e78c1663ac53a2e77a11122166ddaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E5=8D=AB=E5=86=9B?= Date: Tue, 19 Mar 2024 12:48:23 +0000 Subject: [PATCH 3/4] update dotnet-runtime/README.md. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 鲁卫军 --- dotnet-runtime/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet-runtime/README.md b/dotnet-runtime/README.md index e41d8fc..6bb97c7 100644 --- a/dotnet-runtime/README.md +++ b/dotnet-runtime/README.md @@ -19,7 +19,7 @@ We are using `buildx` in here to generate multi-arch images, see more in [Docker 2. Run: ```shell -docker run -d -name dotnet-runtime openeuler/dotnet-runtime:$TAG +docker run -it --rm -name dotnet-runtime openeuler/dotnet-runtime:$TAG ``` # Supported tags and respective Dockerfile links -- Gitee From 1fa9d713fed2e0206c4c1b501a0d031e9e606600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E5=8D=AB=E5=86=9B?= Date: Tue, 19 Mar 2024 12:48:59 +0000 Subject: [PATCH 4/4] update dotnet-runtime/doc/image-info.yml. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 鲁卫军 --- dotnet-runtime/doc/image-info.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet-runtime/doc/image-info.yml b/dotnet-runtime/doc/image-info.yml index 6e84d46..ab4f6ab 100644 --- a/dotnet-runtime/doc/image-info.yml +++ b/dotnet-runtime/doc/image-info.yml @@ -74,7 +74,7 @@ download: " install: " 启动容器 ``` - docker run -d --name dotnet-runtime openeuler/dotnet-runtime:{TAG} + docker run -it --rm --name dotnet-runtime openeuler/dotnet-runtime:{TAG} ``` 用户可根据自身需求,自定义启动选项。 " -- Gitee