hubmc-datagw/Dockerfile

28 lines
471 B
Docker
Raw Permalink Normal View History

2025-10-18 15:13:59 +02:00
FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*
RUN pip install poetry
2025-10-18 16:03:44 +02:00
COPY pyproject.toml poetry.lock ./
2025-10-18 15:13:59 +02:00
RUN poetry config virtualenvs.create false
2025-10-18 16:10:27 +02:00
RUN poetry install --no-root --only main
2025-10-18 15:13:59 +02:00
COPY src/ ./src/
2025-10-18 16:10:27 +02:00
RUN poetry install --only-root
2025-10-18 15:13:59 +02:00
RUN useradd --create-home --shell /bin/bash app && chown -R app:app /app
USER app
EXPOSE 8080
CMD ["python", "-m", "hubgw"]