mirror of
https://github.com/fergalmoran/podnoms.git
synced 2026-01-06 08:36:34 +00:00
34 lines
776 B
Docker
34 lines
776 B
Docker
FROM microsoft/dotnet:2.1.300-preview2-sdk-alpine AS build
|
|
WORKDIR /app
|
|
|
|
# copy csproj and restore as distinct layers
|
|
COPY *.csproj .
|
|
RUN dotnet restore
|
|
|
|
# copy everything else and build app
|
|
COPY . .
|
|
WORKDIR /app/
|
|
RUN dotnet build
|
|
|
|
FROM build AS publish
|
|
WORKDIR /app
|
|
RUN dotnet publish -c Release -o out
|
|
|
|
|
|
FROM microsoft/dotnet:2.1.0-preview2-aspnetcore-runtime-alpine AS runtime
|
|
WORKDIR /app
|
|
COPY --from=publish /app/out ./
|
|
# ln -s /usr/lib/libuv.so.1 /usr/lib/libuv.so && \
|
|
|
|
RUN apk add --no-cache --update \
|
|
python \
|
|
ffmpeg \
|
|
libuv \
|
|
curl \
|
|
curl-dev && \
|
|
curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl && \
|
|
chmod a+rx /usr/local/bin/youtube-dl && \
|
|
youtube-dl -U
|
|
|
|
ENTRYPOINT ["dotnet", "PodNoms.Api.dll"]
|