Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sumantro93/c2bdeea4847c1e3a9a0057faa4384684 to your computer and use it in GitHub Desktop.
Save sumantro93/c2bdeea4847c1e3a9a0057faa4384684 to your computer and use it in GitHub Desktop.
containerfile
# 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