From 0eec67e15278a2b996b89175105cdd6ab2cbe1c3 Mon Sep 17 00:00:00 2001 From: Lance McCarthy Date: Fri, 22 Sep 2023 14:08:06 -0400 Subject: [PATCH] Create Dockerfile_CentOS (#126) --- .../MyAspNetCoreApp/Dockerfile_CentOS | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/AspNetCore/MyAspNetCoreApp/Dockerfile_CentOS diff --git a/src/AspNetCore/MyAspNetCoreApp/Dockerfile_CentOS b/src/AspNetCore/MyAspNetCoreApp/Dockerfile_CentOS new file mode 100644 index 0000000..69e6489 --- /dev/null +++ b/src/AspNetCore/MyAspNetCoreApp/Dockerfile_CentOS @@ -0,0 +1,22 @@ +FROM centos:latest AS base +WORKDIR /app +EXPOSE 80 +EXPOSE 443 + +RUN cd /etc/yum.repos.d/ +RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* +RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* +RUN yum update -y + +# IMPORTANT - Enable EPEL repostiory +# RUN rpm -ihv --nodeps https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm +# or +RUN yum install epel-release -y + +# See https://docs.telerik.com/reporting/knowledge-base/how-to-install-libgdiplus-centos-amazon-linux +# install System.Drawing native dependencies (for Telerik report rendering) +RUN yum install libgdiplus -y + +# Install aspnetcore runtime (if your base image does not have it already) +RUN rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm +RUN yum install aspnetcore-runtime-6.0 -y \ No newline at end of file