-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (31 loc) · 1.61 KB
/
Copy pathDockerfile
File metadata and controls
40 lines (31 loc) · 1.61 KB
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
# syntax=docker/dockerfile:1
# | No ENTRYPOINT | ENTRYPOINT exec_entry p1_entry | ENTRYPOINT [“exec_entry”, “p1_entry”] |
# -------+------------------------+----------------------------------+------------------------------------------------+
# No CMD | error, not allowed | /bin/sh -c exec_entry p1_entry | exec_entry p1_entry |
# -------+------------------------+----------------------------------+------------------------------------------------+
# CMD | [“exec_cmd”, “p1_cmd”] | /bin/sh -c exec_entry p1_entry | exec_entry p1_entry exec_cmd p1_cmd |
# -------+------------------------+----------------------------------+------------------------------------------------+
# CMD | exec_cmd p1_cmd | /bin/sh -c exec_entry p1_entry | exec_entry p1_entry /bin/sh -c exec_cmd p1_cmd |
# Stage 1: Build
FROM python:3.12-slim AS builder
# Install build dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
g++\
&& rm -rf /var/lib/apt/lists/*
WORKDIR /mmcore
COPY . .
RUN pip install --user --no-cache-dir .
# Stage 2: Final
FROM python:3.12-slim
LABEL org.opencontainers.image.source=https://github.com/contextmachine/mmcore
LABEL org.opencontainers.image.description="mmcore, the modern cad/cam engine"
LABEL autor="Andrew Astakhov <sthv.developer@gmail.com>"
# Set environment variables
ENV PYTHONUNBUFFERED=1 \
PATH=/root/.local/bin:$PATH
# Copy installed packages from builder
COPY --from=builder /root/.local /root/.local
EXPOSE 8000
# Define the entrypoint
ENTRYPOINT ["/bin/bash"]