-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
36 lines (26 loc) · 1017 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
FROM node:14-alpine as node
WORKDIR /build/Bonsai
ADD src/Bonsai/package.json .
ADD src/Bonsai/package-lock.json .
RUN npm ci
ADD src/Bonsai .
RUN node_modules/.bin/gulp build
FROM mcr.microsoft.com/dotnet/sdk:8.0 as net-builder
WORKDIR /build
ADD src/Bonsai.sln .
ADD src/Bonsai/Bonsai.csproj Bonsai/
ADD src/Bonsai.Tests.Search/Bonsai.Tests.Search.csproj Bonsai.Tests.Search/
RUN dotnet restore
COPY --from=node /build .
RUN dotnet publish --output ../out/ --configuration Release --runtime linux-musl-x64 --self-contained true Bonsai/Bonsai.csproj
FROM alpine:latest
RUN apk add --no-cache nodejs ffmpeg libintl icu && \
apk add --no-cache libgdiplus --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/
WORKDIR /app
COPY --from=net-builder /out .
RUN mkdir /app/External/ffmpeg
RUN ln -s /usr/bin/ffmpeg /app/External/ffmpeg/ffmpeg && \
ln -s /usr/bin/ffprobe /app/External/ffmpeg/ffprobe && \
chmod +x /app/Bonsai
ENV ASPNETCORE_ENVIRONMENT=Production
ENTRYPOINT ["/app/Bonsai"]