-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-Kubernetes
33 lines (20 loc) · 1.06 KB
/
Dockerfile-Kubernetes
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
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
RUN sed -i "s|MinProtocol = TLSv1.2|MinProtocol = TLSv1|g" /etc/ssl/openssl.cnf && \
sed -i 's|CipherString = DEFAULT@SECLEVEL=2|CipherString = DEFAULT@SECLEVEL=1|g' /etc/ssl/openssl.cnf
RUN apt-get update && apt-get install -y --no-install-recommends curl
WORKDIR /app
COPY Gnoss.BackgroundTask.SocialSearchGraphGeneration/*.csproj ./
RUN dotnet restore
COPY . ./
RUN dotnet publish Gnoss.BackgroundTask.SocialSearchGraphGeneration/Gnoss.BackgroundTask.SocialSearchGraphGeneration.csproj -c Release -o out
FROM mcr.microsoft.com/dotnet/aspnet:6.0
RUN sed -i "s|MinProtocol = TLSv1.2|MinProtocol = TLSv1|g" /etc/ssl/openssl.cnf && \
sed -i 's|CipherString = DEFAULT@SECLEVEL=2|CipherString = DEFAULT@SECLEVEL=1|g' /etc/ssl/openssl.cnf
RUN apt-get update && apt-get install -y --no-install-recommends curl
WORKDIR /app
RUN useradd -r gnoss
RUN chown -R gnoss:gnoss /app
RUN chmod -R 777 /app
USER gnoss
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "Gnoss.BackgroundTask.SocialSearchGraphGeneration.dll"]