-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
76 lines (57 loc) · 1.6 KB
/
Copy pathDockerfile
File metadata and controls
76 lines (57 loc) · 1.6 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
71
72
73
74
75
76
# AegisNet Dockerfile
# Multi-stage build for production-ready deployments
# Stage 1: Base image with common dependencies
FROM ubuntu:22.04 AS base
LABEL maintainer="AegisNet Team"
LABEL description="AegisNet Defense Platform"
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV TZ=UTC
# Install base dependencies
RUN apt-get update && apt-get install -y \
curl \
wget \
git \
ca-certificates \
gnupg \
lsb-release \
software-properties-common \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
# Stage 2: Development environment
FROM base AS development
WORKDIR /app
# Install development tools
RUN apt-get update && apt-get install -y \
vim \
nano \
htop \
net-tools \
iputils-ping \
&& rm -rf /var/lib/apt/lists/*
# Copy application files
COPY . /app/
# Install Python dependencies (when requirements.txt is added)
# RUN pip3 install --no-cache-dir -r requirements.txt
CMD ["/bin/bash"]
# Stage 3: Production environment
FROM base AS production
WORKDIR /app
# Copy only necessary files for production
COPY . /app/
# Install production dependencies only
# RUN pip3 install --no-cache-dir -r requirements.txt --no-dev
# Create non-root user for security
RUN useradd -m -u 1000 aegisnet && \
chown -R aegisnet:aegisnet /app
USER aegisnet
# Expose ports (configure based on your services)
# EXPOSE 8080
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8080/health || exit 1
# Run application
# CMD ["python3", "main.py"]
CMD ["/bin/bash"]