-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathContainerfile
More file actions
33 lines (24 loc) · 815 Bytes
/
Containerfile
File metadata and controls
33 lines (24 loc) · 815 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
33
# Use a minimal python image
FROM python:3.11-alpine
# Copy Caddy binary from official image
COPY --from=caddy:2-alpine /usr/bin/caddy /usr/bin/caddy
# Set working directory
WORKDIR /app
# Copy requirements file
COPY requirements.txt .
# Install dependencies
# --no-cache-dir to minimize image size
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code
COPY aird /app/aird
# Copy Caddy config and entrypoint
COPY Caddyfile /etc/caddy/Caddyfile
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
# Setup default mount point and environment
RUN mkdir -p /project_root
ENV AIRD_ROOT="/project_root"
# Expose port 80 (Caddy gateway)
EXPOSE 80
# Run entrypoint: starts aird in background, Caddy in foreground (PID 1)
ENTRYPOINT ["/docker-entrypoint.sh"]