-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (19 loc) · 716 Bytes
/
Dockerfile
File metadata and controls
26 lines (19 loc) · 716 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
FROM python:3.12-alpine
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
WORKDIR /app
# Copy requirements first for better caching
COPY pyproject.toml .
COPY uv.lock .
COPY src/ src/
COPY start.sh start.sh
RUN chmod +x start.sh
# Install dependencies
RUN pip install --no-cache-dir .
# Copy Tailscale binaries from the tailscale image on Docker Hub.
COPY --from=docker.io/tailscale/tailscale:stable /usr/local/bin/tailscaled /app/tailscaled
COPY --from=docker.io/tailscale/tailscale:stable /usr/local/bin/tailscale /app/tailscale
RUN mkdir -p /var/run/tailscale /var/cache/tailscale /var/lib/tailscale
# Set environment variables
ENV PORT=8080
# Run the application
CMD ["/app/start.sh"]