Files
Key-service-Server/Website/Dockerfile
T
Aiirondev_dev c4a483a57c Add admin instance management and system tools
- Implemented sync_dev_hosts.sh for managing local hosts entries for development.
- Created admin_instances.html for managing school instances, including creation and listing.
- Developed admin_system.html for core services management, including restart and backup operations.
- Added my_instance.html for users to view and manage their assigned instances.
- Introduced provision_instance.sh for provisioning new instances with Docker, including Nginx configuration and SSL certificate handling.
2026-04-14 22:12:14 +02:00

44 lines
1.3 KiB
Docker

FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
iproute2 \
docker.io \
curl \
openssl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN set -eu; \
arch="$(dpkg --print-architecture)"; \
case "$arch" in \
amd64) compose_arch="x86_64" ;; \
arm64) compose_arch="aarch64" ;; \
*) echo "Unsupported architecture for compose plugin: $arch"; exit 1 ;; \
esac; \
curl -fsSL "https://download.docker.com/linux/static/stable/${compose_arch}/docker-27.1.1.tgz" \
-o /tmp/docker.tgz; \
tar -xzf /tmp/docker.tgz -C /tmp; \
install -m 0755 /tmp/docker/docker /usr/local/bin/docker; \
rm -rf /tmp/docker /tmp/docker.tgz; \
mkdir -p /usr/libexec/docker/cli-plugins; \
curl -fsSL "https://github.com/docker/compose/releases/download/v2.29.7/docker-compose-linux-${compose_arch}" \
-o /usr/libexec/docker/cli-plugins/docker-compose; \
chmod +x /usr/libexec/docker/cli-plugins/docker-compose
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN chmod +x /app/provision_instance.sh
EXPOSE 4999
CMD ["python", "main.py"]