20 lines
715 B
Docker
20 lines
715 B
Docker
FROM mcr.microsoft.com/devcontainers/python:3.11
|
|
|
|
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
|
&& apt-get -y install --no-install-recommends build-essential \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# --- C-BIBLIOTHEK BAUEN (adder.c) ---
|
|
COPY adder.c /tmp/adder.c
|
|
# Kompiliert und speichert an einem systemweiten Ort
|
|
RUN gcc -shared -o /usr/local/lib/libadder.so /tmp/adder.c
|
|
|
|
# --- PYTHON-ABHÄNGIGKEITEN ---
|
|
# Kopiert requirements.txt aus dem Projekt-Root
|
|
COPY requirements.txt .
|
|
# Installiert die Pakete
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Setzt das Arbeitsverzeichnis im Container (dies sollte der Mount-Punkt sein)
|
|
WORKDIR /workspace |