-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.k8s
38 lines (27 loc) · 935 Bytes
/
Dockerfile.k8s
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
FROM python:3.11
WORKDIR /app
# First copy the requirements, which will not change too often
COPY ./requirements.txt /app
RUN pip install --no-cache-dir -r requirements.txt
# Now copy everything else
COPY ./src/ /app/src/
# Copy schemas into a separate directory in the image
COPY ./schemas /schemas
# Copy the entrypoint script
COPY start.sh /app/entrypoint.sh
# Make the script executable
RUN chmod +x /app/entrypoint.sh
# Install PostgreSQL client for running the db init scripts
RUN apt-get update && \
apt-get install -y postgresql-client && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install the MinIO client
RUN wget https://dl.min.io/client/mc/release/linux-amd64/mc \
&& chmod +x mc \
&& mv mc /usr/local/bin/
ENV PYTHONPATH=/app/src
# Set the entrypoint to the entrypoint.sh script
ENTRYPOINT ["/app/entrypoint.sh"]
# Default to 'start-server' if no arguments are provided
CMD ["start-server"]