-
Notifications
You must be signed in to change notification settings - Fork 557
Expand file tree
/
Copy pathDockerfile
More file actions
70 lines (55 loc) · 1.44 KB
/
Copy pathDockerfile
File metadata and controls
70 lines (55 loc) · 1.44 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Use Python 3.11 slim image as base
FROM python:3.11-slim
# Set metadata
LABEL maintainer="Jason13"
LABEL description="Argus - Information Gathering & Reconnaissance Toolkit"
LABEL version="2.0"
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV DEBIAN_FRONTEND=noninteractive
# Create non-root user for security
RUN groupadd -r argus && useradd -r -g argus argus
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
g++ \
libffi-dev \
libssl-dev \
libxml2-dev \
libxslt1-dev \
zlib1g-dev \
git \
curl \
wget \
nmap \
whois \
dnsutils \
net-tools \
iputils-ping \
traceroute \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements first for better caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Create necessary directories
RUN mkdir -p /app/results /app/logs /app/config
# Set proper permissions
RUN chown -R argus:argus /app && \
chmod -R 755 /app
# Switch to non-root user
USER argus
# Create volume for results and config
VOLUME ["/app/results", "/app/config"]
# Expose port (if needed for web interface in future)
EXPOSE 8080
# Set default command
ENTRYPOINT ["python", "-m", "argus"]
# Default command (can be overridden)
CMD ["--help"]