docker cleanup

This commit is contained in:
Eugene Pankov
2021-11-21 12:50:38 +01:00
parent 25bd18a39d
commit 36a5a9889f
8 changed files with 5 additions and 88 deletions

View File

@@ -1,2 +0,0 @@
__pycache__
public

View File

@@ -1,22 +0,0 @@
# syntax=docker/dockerfile:1
FROM python:3.7-alpine AS build
ARG EXTRA_DEPS
RUN apk add build-base musl-dev libffi-dev openssl-dev mariadb-dev
WORKDIR /app
RUN pip install -U setuptools 'cryptography>=3.0,<3.1' poetry==1.1.7 $EXTRA_DEPS
COPY pyproject.toml poetry.lock ./
RUN poetry config virtualenvs.create false
RUN poetry install --no-dev --no-ansi --no-interaction
FROM python:3.7-alpine AS package
WORKDIR /app
COPY --from=0 /usr /usr
COPY manage.py gunicorn.conf.py ./
COPY tabby tabby
COPY start.sh /start.sh
RUN ["chmod", "+x", "/start.sh"]
RUN ./manage.py collectstatic --noinput
CMD ["/start.sh"]

View File

@@ -1,14 +0,0 @@
steps:
- name: 'gcr.io/cloud-builders/docker'
dir: 'backend'
args:
- build
- '-t'
- '${_DOCKER_TAG}'
- '--cache-from'
- '${_DOCKER_TAG}'
- '--build-arg'
- 'EXTRA_DEPS=${_EXTRA_DEPS}'
- '.'
images: ['${_DOCKER_TAG}']