This commit is contained in:
29
Dockerfile
29
Dockerfile
@ -1,20 +1,19 @@
|
||||
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||
FROM python:3.8-slim
|
||||
|
||||
ENV TZ Europe/Budapest
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim AS base
|
||||
WORKDIR /app
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
|
||||
WORKDIR /src
|
||||
COPY ["OutputServiceTSDB.csproj", ""]
|
||||
RUN dotnet restore "./OutputServiceTSDB.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/."
|
||||
RUN dotnet build "OutputServiceTSDB.csproj" -c Release -o /app/build
|
||||
ARG RELEASE_ID
|
||||
ENV RELEASE_ID ${RELEASE_ID:-""}
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "OutputServiceTSDB.csproj" -c Release -o /app/publish
|
||||
COPY requirements.txt ./
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "OutputServiceTSDB.dll"]
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY ./src .
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["python3", "app.py"]
|
||||
|
Reference in New Issue
Block a user