-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile
31 lines (25 loc) · 1.01 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
FROM mcr.microsoft.com/dotnet/core/sdk:2.1 AS build-env
WORKDIR /app
COPY /OpenImis.RestApi/*.csproj ./
RUN dotnet restore
ARG BUILD-FLAVOUR=Release
COPY . ./
RUN dotnet publish OpenImis.RestApi/OpenImis.RestApi.csproj -c $BUILD-FLAVOUR -o out
FROM mcr.microsoft.com/dotnet/core/aspnet:2.1
WORKDIR /app
ENV DB_HOST=Server
ENV DB_NAME=IMIS
ENV DB_USER=IMISuser
ENV DB_PASSWORD=IMISuser@1234
# copy appsettings templates
COPY ./OpenImis.RestApi/config/appsettings.Production.json.dist /app/tpl/
COPY ./OpenImis.RestApi/config/appsettings.json /app/config/
COPY ./scripts/entrypoint.sh /app/
RUN chmod a+x /app/entrypoint.sh
COPY --from=build-env /app/OpenImis.RestApi/out .
RUN echo 'deb http://archive.debian.org/debian/ stretch main' > /etc/apt/sources.list \
&& echo 'deb http://archive.debian.org/debian-security/ stretch/updates main' >> /etc/apt/sources.list \
&& apt-get -o Acquire::Check-Valid-Until=false update \
&& apt-get install gettext -y \
&& rm -rf /var/lib/apt/lists/*
ENTRYPOINT /app/entrypoint.sh