-
Notifications
You must be signed in to change notification settings - Fork 46
/
Dockerfile-MySQL
31 lines (23 loc) · 963 Bytes
/
Dockerfile-MySQL
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
FROM python:3.10-slim-bullseye
MAINTAINER Cash Costello <cash.costello@gmail.com>
LABEL Description="Image for running a Turkle interface using MySQL"
WORKDIR /opt/turkle
COPY requirements.txt /opt/turkle/requirements.txt
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends cron default-libmysqlclient-dev build-essential pkg-config; \
pip install --no-cache-dir --upgrade -r requirements.txt gunicorn mysqlclient whitenoise; \
apt-get remove --purge -y build-essential; \
apt-get autoremove -y; \
rm -rf /var/lib/apt/lists/*
COPY turkle /opt/turkle/turkle
COPY manage.py /opt/turkle/manage.py
COPY turkle_site /opt/turkle/turkle_site
COPY docker-config/entrypoint.sh /usr/local/bin/entrypoint.sh
COPY docker-config/turkle.crontab /etc/cron.d/turkle
RUN crontab /etc/cron.d/turkle
ENV TURKLE_DOCKER=1
RUN python manage.py collectstatic
VOLUME /opt/turkle
EXPOSE 8080
CMD [ "/usr/local/bin/entrypoint.sh" ]