-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (26 loc) · 960 Bytes
/
Dockerfile
File metadata and controls
34 lines (26 loc) · 960 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
FROM registry.access.redhat.com/ubi9/go-toolset
# Install system dependencies required by operator tooling
USER 0
RUN dnf install -y \
git \
make && \
# Install GitHub CLI
dnf install -y 'dnf-command(config-manager)' && \
dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo && \
dnf install -y gh && \
dnf install -y python3.11 && \
dnf install -y python3.11-pip && \
dnf clean all
WORKDIR /app
# Install Python dependencies
COPY server/requirements.txt .
RUN python3.11 -m pip install --no-cache-dir -r requirements.txt
# Copy server code and config
COPY server/server.py server/config.json ./
# Copy plugins directory
# server.py resolves: Path(__file__).parent.parent / "plugins" / "oape"
# With __file__=/app/server.py, parent.parent=/, so it expects /plugins/oape
COPY plugins /plugins
USER 1001
EXPOSE 8000
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8000"]