-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (22 loc) · 834 Bytes
/
Dockerfile
File metadata and controls
32 lines (22 loc) · 834 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
# Determine build environment stage (used for linting & testing)
FROM mcr.microsoft.com/dotnet/core/sdk:2.1 AS build-env
# Get environment argument
ARG env
# Set directory to run following steps from
WORKDIR /app
# Copy source files
COPY . .
# Tune environment
RUN ./scripts/tune_env.sh $env
# Define build-env entrypoint
ENTRYPOINT [ "scripts/launch.sh" ]
CMD [ "run" ]
#-----------------------------------------------------------------------
# Determine production envrionment stage (used only for running api)
FROM mcr.microsoft.com/dotnet/core/aspnet:2.1 AS prod-env
# Set directory to run following steps from
WORKDIR /root/
# Copy binary from build environment stage
COPY --from=build-env /app/ApiFarm/bin/Release/netcoreapp2.1/linux-x64/* .
# Run executable
ENTRYPOINT [ "./ApiFarm" ]