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: ...@@ -16,12 +16,16 @@ stages:
variables: variables:
DOCKER_BUILDKIT: 1 DOCKER_BUILDKIT: 1
BUILDKIT_INLINE_CACHE: 1 BUILDKIT_INLINE_CACHE: 1
DOCKER_TMPDIR: /mnt/volume
build: build:
stage: build stage: build
image: docker:24 image: docker:24
services: 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: before_script:
- docker ps || echo "Docker Daemon is not responding" - docker ps || echo "Docker Daemon is not responding"
- docker info || cat /var/log/docker.log - docker info || cat /var/log/docker.log
...@@ -32,6 +36,8 @@ build: ...@@ -32,6 +36,8 @@ build:
- docker volume prune -f - docker volume prune -f
- df -h - df -h
- ls -la /mnt/volume - ls -la /mnt/volume
tmpfs:
- /var/lib/docker:rw,noexec,nosuid,size=20g
script: script:
- docker build --no-cache --pull --progress=plain -t flask-backend-full -f flask_ml_api/Dockerfile . - docker build --no-cache --pull --progress=plain -t flask-backend-full -f flask_ml_api/Dockerfile .
cache: cache:
...@@ -40,3 +46,10 @@ build: ...@@ -40,3 +46,10 @@ build:
- /mnt/volume - /mnt/volume
timeout: 1h 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