-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (27 loc) · 958 Bytes
/
Dockerfile
File metadata and controls
36 lines (27 loc) · 958 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
34
35
36
FROM ghcr.io/astral-sh/uv:python3.11-bookworm
COPY . /app
WORKDIR /app
# Install system dependencies needed for the app or kubectl
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
build-essential \
apt-transport-https \
ca-certificates \
libssl-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install kubectl
RUN curl -LO "https://dl.k8s.io/release/$(curl -Ls https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
&& install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl \
&& rm kubectl
RUN curl https://rclone.org/install.sh | bash
# Copy dependency definition files
COPY pyproject.toml uv.lock* /app/
# Install Python dependencies using uv
RUN uv sync --frozen --prerelease=allow
# Copy the rest of the application code
COPY . /app/
EXPOSE 9090
ENV DB_TYPE=sqlite
# Run the application
CMD ["uv", "run", "--prerelease=allow", "python", "-m", "foo.server"]