-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (26 loc) · 1022 Bytes
/
Copy pathDockerfile
File metadata and controls
43 lines (26 loc) · 1022 Bytes
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
FROM python:3.11-slim AS python-base
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
COPY requirements.txt pyproject.toml README.md ./
COPY python ./python
COPY tests ./tests
RUN python -m pip install --no-cache-dir --upgrade pip && \
python -m pip install --no-cache-dir -r requirements.txt && \
python -m pip install --no-cache-dir -e .
FROM python-base AS app
CMD ["python", "-m", "apex_engine.cli", "demo"]
FROM python-base AS dashboard
CMD ["python", "-m", "apex_engine.cli", "dashboard", "run", "--host", "0.0.0.0", "--port", "8501"]
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS dotnet-build
WORKDIR /src
COPY dotnet ./dotnet
RUN dotnet restore dotnet/Apex.sln && \
dotnet publish dotnet/Apex.Api/Apex.Api.csproj -c Release -o /out --no-restore
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS api
WORKDIR /app
ENV ASPNETCORE_URLS=http://0.0.0.0:8080 \
ASPNETCORE_ENVIRONMENT=Production
COPY --from=dotnet-build /out ./
EXPOSE 8080
ENTRYPOINT ["dotnet", "Apex.Api.dll"]