Created
May 19, 2024 04:30
-
-
Save sumantro93/c2bdeea4847c1e3a9a0057faa4384684 to your computer and use it in GitHub Desktop.
containerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start with a base image | |
FROM fedora:latest | |
# Set up environment variables | |
ENV LANG=en_US.UTF-8 | |
ENV LC_ALL=en_US.UTF-8 | |
# Update the base image and install required packages | |
RUN dnf -y update && dnf -y install \ | |
httpd \ | |
zstd \ | |
&& dnf clean all | |
# Set the ServerName directive globally to avoid AH00558 warning | |
RUN echo "ServerName localhost" >> /etc/httpd/conf/httpd.conf | |
# Create the document root directory | |
RUN mkdir -p /var/www/html | |
# Copy files from the host to the container | |
COPY index.html /var/www/html/ | |
# Expose the port the application runs on | |
EXPOSE 80 | |
# Set the default command to run when the container starts | |
CMD ["httpd", "-D", "FOREGROUND"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment