Skip to content

Commit

Permalink
Create Dockerfile_CentOS (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
LanceMcCarthy committed Sep 22, 2023
1 parent 192e90b commit 0eec67e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/AspNetCore/MyAspNetCoreApp/Dockerfile_CentOS
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0eec67e

Please sign in to comment.