-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
46 lines (25 loc) · 856 Bytes
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build-env
# install NodeJS 14.x
# see https://github.com/nodesource/distributions/blob/master/README.md#deb
RUN apt-get update -yq
RUN apt-get install curl gnupg -yq
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs
RUN npm install -g npm
WORKDIR /app
COPY *.csproj ./
RUN dotnet restore
# Copy everything else and build
COPY . ./
RUN npm install
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/aspnet:5.0
RUN apt-get update && apt-get install -y libgdiplus && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --chown=1000:1000 --from=build-env /app/out .
VOLUME /data
EXPOSE 5000
# host on 5000
ENV ASPNETCORE_URLS=http://*:5000
HEALTHCHECK CMD curl -s -o /dev/null -w "%{http_code}" -L localhost:5000 || exit 1
CMD dotnet Journal.dll