-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
61 lines (39 loc) · 1.11 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM centos:6.6
ARG GIT_VERSION
ENV GIT_VERSION=${GIT_VERSION}
RUN yum install -y yum-plugin-ovl
RUN yum install -y \
libicu \
epel-release \
libunwind \
openssl \
libnghttp2 \
libidn \
krb5 \
libuuid \
lttng-ust \
tar \
libcurl \
wget \
curl \
zlib \
git
COPY files/libunwind-1.1-3.el6.x86_64.rpm /tmp/
RUN rpm -Uvh /tmp/libunwind-1.1-3.el6.x86_64.rpm
COPY files/dotnet-install.sh /root/
RUN /root/dotnet-install.sh
ENV DOTNET_CLI_TELEMETRY_OPTOUT=true
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true
COPY ./Calamari /app
WORKDIR /app
ENV PATH=$PATH:/root/.dotnet:/root/.dotnet/tools
ENV DOTNET_ROOT=/root/.dotnet
COPY files/gitversion.sh .gitversion.sh
RUN ./.gitversion.sh
RUN git checkout $(cat .gitversion.txt)
WORKDIR /app/source
RUN sed -i -e 's/Include=\"Autofac\"\ Version=\"4.8.0\"/Include=\"Autofac\"\ Version=\"5.2.0\"/g' Calamari/Calamari.csproj
RUN dotnet publish Calamari -c Release -f netcoreapp3.1 -o ./artifacts --self-contained -r rhel.6-x64 /p:Version=$(cat ../.gitversion.txt)
RUN mkdir -p /artifacts
RUN cp -R artifacts/* /artifacts/
RUN cp /app/.gitversion.txt /artifacts/