diff --git a/dotnet-aspnet/8.0.3/22.03-lts-sp3/Dockerfile b/dotnet-aspnet/8.0.3/22.03-lts-sp3/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..8a4902bd677c513a8e2b07a27f73f2f52b24c206 --- /dev/null +++ b/dotnet-aspnet/8.0.3/22.03-lts-sp3/Dockerfile @@ -0,0 +1,16 @@ +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 aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/${VERSION}/aspnetcore-runtime-${VERSION}-linux-${BUILDARCH}.tar.gz && \ + mkdir -p /dotnet && tar -oxzf aspnetcore.tar.gz -C /dotnet ./shared/Microsoft.AspNetCore.App && \ + mv /dotnet /usr/share/dotnet && \ + rm -f aspnetcore.tar.gz diff --git a/dotnet-aspnet/README.md b/dotnet-aspnet/README.md new file mode 100644 index 0000000000000000000000000000000000000000..f8bd1dc0115bba5a0324670122b7d1de6135df2f --- /dev/null +++ b/dotnet-aspnet/README.md @@ -0,0 +1,30 @@ +# Dotnet-aspnet + +# Quick reference + +- The official dotnet-aspnet 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-aspnet:$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 -it --name dotnet-aspnet openeuler/dotnet-aspnet:{TAG} +``` + +# Supported tags and respective Dockerfile links + +- 8.0.3-oe2203sp3: dotnet-aspnet v8.0.3, openEuler 22.03 LTS SP3 + +## Operating System +Linux/Unix, ARM64 or x86-64 architecture. diff --git a/dotnet-aspnet/doc/image-info.yml b/dotnet-aspnet/doc/image-info.yml new file mode 100644 index 0000000000000000000000000000000000000000..c7e5d1a2f4fa9caa82dd4ab9633ac475a297bd6a --- /dev/null +++ b/dotnet-aspnet/doc/image-info.yml @@ -0,0 +1,88 @@ +name: dotnet-aspnet +category: cloud +description: Dotnet-aspnet(ASP.NET Core)是一个开源跨平台框架,用于构建基于云的现代互联网连接应用程序,例如Web应用程序、物联网应用程序和移动后端。ASP.NET Core应用程序在.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-aspnet:{TAG} + ``` + " +install: " + 启动容器 + ``` + docker run -it --rm --name dotnet-aspnet openeuler/dotnet-aspnet:{TAG} + ``` + 用户可根据自身需求,自定义启动选项。 + " +license: MIT license +similar_packages: + - Ruby on Rails: Ruby on Rails(简称 Rails)是一个使用Ruby编程语言开发的开源Web应用程序框架。它提供了类似于ASP.NET的MVC(Model-View-Controller)架构以及许多内置功能,如路由、模板引擎、数据库访问等。 + - Django: Django是一个使用Python编程语言开发的高级Web应用程序框架。它提供了类似于ASP.NET的MVC架构,并内置了许多功能和工具,如数据模型、表单处理、认证系统等。 + - Laravel: Laravel是一个使用PHP编程语言开发的Web应用程序框架。它提供了类似于ASP.NET的MVC架构,并包含了许多特性和工具,如路由、数据库访问、身份验证等。 + - Express.js: Express.js是一个使用JavaScript编程语言开发的Web应用程序框架,基于Node.js运行时。它提供了类似于ASP.NET的路由、中间件、模板引擎等功能,用于构建快速和可扩展的Web应用程序。 +dependency: + - .NET Runtime \ No newline at end of file diff --git a/dotnet-aspnet/doc/picture/logo.png b/dotnet-aspnet/doc/picture/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..b99c078ffc1641a1afc7950ffb45e32447858e9e Binary files /dev/null and b/dotnet-aspnet/doc/picture/logo.png differ diff --git a/dotnet-aspnet/meta.yml b/dotnet-aspnet/meta.yml new file mode 100644 index 0000000000000000000000000000000000000000..5c4db1eff8a56da9fad2a3e96899917bd16b856c --- /dev/null +++ b/dotnet-aspnet/meta.yml @@ -0,0 +1,2 @@ +8.0.3-oe2203sp3: + dotnet-aspnet/8.0.3/22.03-lts-sp3/Dockerfile \ No newline at end of file