2026-09-25 14:04:33 +08:00
|
|
|
FROM python:3.11-slim-bookworm
|
|
|
|
|
|
|
|
|
|
ARG PASSWORD
|
|
|
|
|
|
|
|
|
|
WORKDIR /opt
|
|
|
|
|
|
|
|
|
|
COPY apt-insecure.conf /etc/apt/apt.conf.d/99gemastik-insecure
|
2026-09-25 21:03:29 +08:00
|
|
|
RUN apt-get -o Acquire::AllowInsecureRepositories=true update && \
|
|
|
|
|
apt-get -y --allow-unauthenticated install -y nano openssh-server curl
|
2026-09-25 14:04:33 +08:00
|
|
|
|
|
|
|
|
RUN echo root:${PASSWORD} | chpasswd
|
|
|
|
|
RUN echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
|
|
|
|
|
RUN echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
|
|
|
|
|
RUN service ssh start
|
|
|
|
|
|
|
|
|
|
COPY src/ .
|
|
|
|
|
|
|
|
|
|
RUN mkdir -p uploads/
|
|
|
|
|
RUN pip install -r requirements.txt
|
|
|
|
|
RUN chmod +x ./start.sh
|
|
|
|
|
|
|
|
|
|
EXPOSE 80
|
|
|
|
|
EXPOSE 22
|
|
|
|
|
|
|
|
|
|
CMD ./start.sh
|