forked from Ankermgmt/ankermake-m5-protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (22 loc) · 785 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
# First stage: build environment
FROM python:3.11-bullseye AS build-env
# Set the working directory to /app
WORKDIR /app
# Copy the requirements file
COPY requirements.txt .
# Install the dependencies
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Second stage: runtime environment
FROM python:3.11-slim
# Set the working directory to /app
WORKDIR /app
RUN mkdir -p /root/.config/
# Copy the script and libraries
COPY ankerctl.py /app/
COPY static /app/static/
COPY libflagship /app/libflagship/
COPY cli /app/cli/
# Copy the installed dependencies from the build environment
COPY --from=build-env /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
ENTRYPOINT ["python", "/app/ankerctl.py"]