-
Notifications
You must be signed in to change notification settings - Fork 0
/
WebApiDockerfile
33 lines (24 loc) · 1 KB
/
WebApiDockerfile
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
FROM registry-vpc.cn-hongkong.aliyuncs.com/wiltechs/sdk:8.0 AS build-env
USER root
WORKDIR /app
EXPOSE 8080
EXPOSE 443
COPY ./src/SmartTalk.Api ./build/SmartTalk.Api
COPY ./src/SmartTalk.Core ./build/SmartTalk.Core
COPY ./src/SmartTalk.Messages ./build/SmartTalk.Messages
COPY ./NuGet.Config ./build
RUN dotnet publish build/SmartTalk.Api -c Release -o out
FROM registry-vpc.cn-hongkong.aliyuncs.com/wiltechs/aspnet:8.0
USER root
RUN apt-get update && apt-get install -y nasm
# ffmpeg
RUN apt-get update && apt-get install -y bzip2 make gcc yasm libopencore-amrnb-dev libopencore-amrwb-dev wget
RUN wget https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && \
tar -jxvf ffmpeg-snapshot.tar.bz2 && \
cd ffmpeg && \
./configure --enable-gpl --enable-libopencore-amrnb --enable-libopencore-amrwb --prefix=/usr/local/ffmpeg --enable-version3 && \
make -j8 && make install && \
ln -s /usr/local/ffmpeg/bin/ffmpeg /usr/local/bin/
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "SmartTalk.Api.dll"]