Files
tabby-web/backend/Dockerfile

20 lines
562 B
Docker
Raw Normal View History

2021-07-25 20:45:15 +02:00
# syntax=docker/dockerfile:1
2021-07-26 20:37:54 +02:00
FROM python:3.7-alpine AS build
2021-07-26 17:56:35 +02:00
ARG EXTRA_DEPS
2021-07-26 12:30:47 +02:00
RUN apk add build-base musl-dev libffi-dev openssl-dev mariadb-dev
2021-07-25 20:45:15 +02:00
WORKDIR /app
2021-07-26 17:56:35 +02:00
RUN pip install -U setuptools 'cryptography>=3.0,<3.1' poetry==1.1.7 ${EXTRA_DEPS}
2021-07-26 12:30:47 +02:00
COPY pyproject.toml poetry.lock ./
RUN poetry config virtualenvs.create false
RUN poetry install --no-dev --no-ansi --no-interaction
2021-07-25 20:45:15 +02:00
2021-07-26 20:37:54 +02:00
FROM python:3.7-alpine AS package
2021-07-25 20:45:15 +02:00
WORKDIR /app
2021-07-26 18:13:19 +02:00
COPY --from=0 /usr /usr
2021-07-26 20:30:39 +02:00
COPY manage.py gunicorn.conf.py ./
2021-07-26 12:30:47 +02:00
COPY tabby tabby
2021-07-26 20:30:39 +02:00
COPY start.sh /start.sh
RUN chmod +x /start.sh
CMD ["/start.sh"]