-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (32 loc) · 1.34 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
33
34
35
36
37
38
39
40
41
42
43
FROM ubuntu:18.04
ENV MONO_VERSION 5.4.1.6
# install base software
RUN apt-get update \
&& apt-get install -y curl apt-transport-https gnupg wget dpkg
# adding sources and updating
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
RUN echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/$MONO_VERSION main" > /etc/apt/sources.list.d/mono-official.list \
&& apt-get update
# install mono
RUN apt-get install -y mono-runtime-sgen mono-runtime binutils curl mono-devel ca-certificates-mono fsharp mono-vbnc nuget referenceassemblies-pcl
# install dotnetcore
RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& apt-get update -y \
&& apt-get install -y dotnet-sdk-2.2
# install dos2unix
RUN apt-get install -y dos2unix
# install dotnet cake v3
RUN dotnet tool install -g Cake.Tool --version 0.30.0
# cleanup
RUN rm -rf /var/lib/apt/lists/* /tmp/* packages-microsoft-prod.deb
# Set workdir alias
WORKDIR /api
# # Fix .netcore paths if dotnet is installed
RUN mkdir -p ~/scripts
ADD scripts /scripts
RUN echo "source /scripts/dotnetcore.sh" >> ~/.bashrc
# add entrypoint and run
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
CMD ["/bin/bash","-i", "/entrypoint.sh"]