canva-render/Dockerfile

26 lines
990 B
Docker
Raw Normal View History

# FROM nvcr.io/nvidia/pytorch:23.10-py3
FROM ubuntu:20.04
2023-12-19 06:39:13 +00:00
RUN apt update && apt install software-properties-common -y
RUN add-apt-repository ppa:deadsnakes/ppa -y
RUN apt update && DEBIAN_FRONTEND=noninteractive apt install curl python3.11-full python3.11-distutils python3.11-venv -y
ENV POETRY_HOME="/usr/local"
RUN curl -sSL https://install.python-poetry.org | python3.11 -;
WORKDIR /app
COPY pyproject.toml /app
RUN poetry env use /usr/bin/python3.11
RUN poetry install
RUN poetry run playwright install firefox && poetry run playwright install-deps
RUN apt install -y trafficserver
COPY trafficserver_config/*.config /etc/trafficserver/
COPY trafficserver_config/ssl /etc/trafficserver/ssl
RUN chown -R trafficserver:trafficserver /etc/trafficserver
COPY trafficserver_config/ssl/canva.com.crt /usr/local/share/ca-certificates/canva.com.crt
RUN update-ca-certificates
COPY dns_records.sh .
2023-12-19 06:39:13 +00:00
CMD su - root -c "sh /app/dns_records.sh" && /etc/init.d/trafficserver start && /bin/bash