-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (25 loc) · 794 Bytes
/
Dockerfile
File metadata and controls
35 lines (25 loc) · 794 Bytes
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
FROM mcr.microsoft.com/dotnet/sdk:10.0-preview AS build
WORKDIR /src
COPY ad-dotnet-10-example.csproj ./
RUN dotnet restore
COPY . ./
RUN dotnet publish -c Release -o /out
FROM mcr.microsoft.com/dotnet/runtime:10.0-preview
# Install kerberos + ldap tools
RUN apt-get update && apt-get install -y \
krb5-user \
libsasl2-modules-gssapi-mit \
ldap-utils \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# copy app
COPY --from=build /out/ .
RUN mkdir -p /etc/security/keytabs
# copy configs into correct system locations
COPY ad-files/krb5.conf /etc/krb5.conf
COPY ad-files/ldap.conf /etc/ldap/ldap.conf
# entrypoint handles authentication
COPY docker-entrypoint.sh /entrypoint.sh
RUN sed -i 's/\r$//' /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]