Skip to content

Instantly share code, notes, and snippets.

@geoffreysmith
Created October 31, 2020 22:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geoffreysmith/c8c3b780b96673afa5ace4d96d9416af to your computer and use it in GitHub Desktop.
Save geoffreysmith/c8c3b780b96673afa5ace4d96d9416af to your computer and use it in GitHub Desktop.
FROM mono:6.8
RUN apt-get update \
&& apt-get install -y \
curl \
tzdata \
binutils \
ca-certificates-mono \
fsharp \
mono-vbnc \
referenceassemblies-pcl \
apache2 \
libapache2-mod-mono \
mono-apache-server4 \
mono-xsp4-base \
libjpeg62 \
apache2 \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/tmp/* \
&& rm -rf /tmp/* \
&& rm -rf /var/lib/apt/lists/*
RUN a2enmod mod_mono \
&& service apache2 stop \
&& mkdir -p /etc/mono/registry /etc/mono/registry/LocalMachine \
&& sed -ri ' \
s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; \
s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g; \
' /etc/apache2/apache2.conf
RUN rm -rf /etc/apache2/sites-enabled/000-default.conf
ADD ./apache2-site.conf /etc/apache2/sites-enabled/000-default.conf
ADD /Website /var/www/
WORKDIR /var/www
EXPOSE 80
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment