-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 986 Bytes
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 986 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
# MemoryGuard Docker Image
# Usage: docker run -v $(pwd):/app ghcr.io/shadd0wtaka/memoryguard python -c "from memoryguard import MemoryGuard; ..."
FROM python:3.11-slim
LABEL maintainer="SHAdd0WTAka"
LABEL description="MemoryGuard - Modular Python Memory Monitoring"
LABEL org.opencontainers.image.source="https://github.com/SHAdd0WTAka/memoryguard"
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
valgrind \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements first for better caching
COPY pyproject.toml README.md ./
COPY memoryguard/ ./memoryguard/
# Install the package
RUN pip install --no-cache-dir -e ".[all]"
# Create non-root user
RUN useradd -m -u 1000 memoryguard && \
chown -R memoryguard:memoryguard /app
USER memoryguard
# Default command
CMD ["python", "-c", "from memoryguard import MemoryGuard, __version__; print(f'MemoryGuard v{__version__} ready!')"]