Skip to content

Instantly share code, notes, and snippets.

@Rahmanism
Created August 15, 2024 11:32
Show Gist options
  • Save Rahmanism/3fdb4736760b83ca92e6301e1183571c to your computer and use it in GitHub Desktop.
Save Rahmanism/3fdb4736760b83ca92e6301e1183571c to your computer and use it in GitHub Desktop.
Dockerfile for Apache on CentOS 7
FROM centos:7
LABEL Remarks="This is a dockerfile example for Centos system"
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 -y update && yum -y install httpd && yum clean all
# ADD ./site/html.tar.gz /var/www/html/
EXPOSE 80
CMD ["apachectl", "-D", "FOREGROUND"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment