Commit ee5f4591 authored by Artem Baranovskyi's avatar Artem Baranovskyi
Browse files

Image build is optimized.

parent 890f1935
Pipeline #10671 failed
......@@ -16,12 +16,16 @@ stages:
variables:
DOCKER_BUILDKIT: 1
BUILDKIT_INLINE_CACHE: 1
DOCKER_TMPDIR: /mnt/volume
build:
stage: build
image: docker:24
services:
- docker:24-dind
- name: docker:24-dind
command: ["--tls=false", "--storage-driver=overlay2", "--mtu=1500", "--data-root=/mnt/volume"]
memory: 1g
memory_swap: 2g
before_script:
- docker ps || echo "Docker Daemon is not responding"
- docker info || cat /var/log/docker.log
......@@ -32,6 +36,8 @@ build:
- docker volume prune -f
- df -h
- ls -la /mnt/volume
tmpfs:
- /var/lib/docker:rw,noexec,nosuid,size=20g
script:
- docker build --no-cache --pull --progress=plain -t flask-backend-full -f flask_ml_api/Dockerfile .
cache:
......@@ -40,3 +46,10 @@ build:
- /mnt/volume
timeout: 1h
deploy:
stage: deploy
dependencies:
- build
script:
- docker run -d flask-backend
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment