-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (27 loc) · 811 Bytes
/
Copy pathDockerfile
File metadata and controls
37 lines (27 loc) · 811 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
36
37
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
# adding curl and gpg for healthcheck
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
gpg \
&& rm -rf /var/lib/apt/lists/*
EXPOSE 5000
EXPOSE 5001
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG Configuration=debug
WORKDIR /src
COPY ./Streetcode/ ./
#restoring dependencies
RUN dotnet restore Streetcode.sln
# copying other neccessary data and building application
RUN dotnet build -c $Configuration -o /app/build
# publishishing application
FROM build AS publish
RUN dotnet publish -c $Configuration -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish ./
LABEL atom="Streetcode"
ENTRYPOINT ["dotnet", "Streetcode.WebApi.dll", "--environment=Local"]