-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
32 lines (32 loc) · 1.75 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM microsoft/dotnet:2.1.503-sdk-stretch
LABEL maintainer "Dave Curylo <dave@curylo.org>"
ENV MONO_THREADS_PER_CPU 50
RUN MONO_VERSION=5.18.0.240 && \
FSHARP_VERSION=10.2.1 && \
FSHARP_BASENAME=fsharp-$FSHARP_VERSION && \
FSHARP_ARCHIVE=$FSHARP_VERSION.tar.gz && \
FSHARP_ARCHIVE_URL=https://github.com/fsharp/fsharp/archive/$FSHARP_VERSION.tar.gz && \
export GNUPGHOME="$(mktemp -d)" && \
apt-get update && apt-get --no-install-recommends install -y gnupg dirmngr && \
apt-key adv --no-tty --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
echo "deb https://download.mono-project.com/repo/debian stable-stretch/snapshots/$MONO_VERSION main" | tee /etc/apt/sources.list.d/mono-official-stable.list && \
apt-get install -y apt-transport-https && \
apt-get update -y && \
apt-get --no-install-recommends install -y pkg-config make nuget mono-devel msbuild ca-certificates-mono locales && \
rm -rf /var/lib/apt/lists/* && \
echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen && /usr/sbin/locale-gen && \
mkdir -p /tmp/src && \
cd /tmp/src && \
printf "namespace a { class b { public static void Main(string[] args) { new System.Net.WebClient().DownloadFile(\"%s\", \"%s\");}}}" $FSHARP_ARCHIVE_URL $FSHARP_ARCHIVE > download-fsharp.cs && \
mcs download-fsharp.cs && mono download-fsharp.exe && rm download-fsharp.exe download-fsharp.cs && \
tar xf $FSHARP_ARCHIVE && \
cd $FSHARP_BASENAME && \
make && \
make install && \
cd ~ && \
rm -rf /tmp/src /tmp/NuGetScratch ~/.nuget ~/.config ~/.local "$GNUPGHOME" && \
apt-get purge -y make gnupg dirmngr && \
apt-get clean
WORKDIR /root
ENV FrameworkPathOverride /usr/lib/mono/4.7.1-api/
CMD ["fsharpi"]