UnisKB/installer/Dockerfile-base

36 lines
1.3 KiB
Plaintext
Raw Normal View History

2025-04-14 07:47:02 +00:00
FROM python:3.11-slim-bullseye AS python-stage
FROM postgres:17.4-bullseye
2025-06-24 08:57:00 +00:00
COPY --from=python-stage /usr/local /usr/local
COPY installer/*.sh /usr/bin/
COPY installer/init.sql /docker-entrypoint-initdb.d/
2025-04-14 07:47:02 +00:00
ARG DEPENDENCIES=" \
libexpat1-dev \
libffi-dev \
curl \
ca-certificates \
vim \
gettext \
2025-04-21 03:15:22 +00:00
wait-for-it \
2025-04-18 06:10:16 +00:00
redis-server \
2025-04-14 07:47:02 +00:00
postgresql-17-pgvector \
postgresql-17-age"
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone && \
apt-get update && apt-get install -y --no-install-recommends $DEPENDENCIES && \
apt-get clean all && \
2025-06-24 08:57:00 +00:00
rm -rf /var/lib/apt/lists/* && \
chmod 755 /usr/bin/start-*.sh && \
2025-06-24 09:24:25 +00:00
find /etc/ -type f ! -path '/etc/resolv.conf' ! -path '/etc/hosts' | xargs chmod g-rx && \
curl -L --connect-timeout 120 -m 1800 https://resource.fit2cloud.com/maxkb/ffmpeg/get-ffmpeg-linux | sh
2025-04-18 06:10:16 +00:00
ENV PGDATA=/opt/maxkb/data/postgresql/pgdata \
POSTGRES_USER=root \
POSTGRES_PASSWORD=Password123@postgres \
POSTGRES_MAX_CONNECTIONS=1000 \
REDIS_PASSWORD=Password123@redis \
2025-06-25 08:05:02 +00:00
LANG=en_US.UTF-8 \
MAXKB_LOG_LEVEL=INFO