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

Image build is optimized.

parent e1f4720f
Pipeline #10703 failed with stages
in 57 seconds
......@@ -23,7 +23,16 @@ variables:
DOCKER_CPUS: "2"
before_script:
- docker login -u $DOCKER_USER -p $DOCKER_PW
- docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD
- docker system prune -a -f --volumes || true
- docker container prune -f || true
- docker network prune -f || true
- docker image prune -a -f || true
- docker builder prune -f || true
- sudo apt-get clean
- sudo rm -rf /var/lib/apt/lists/*
- sudo rm -rf /tmp/*
- sudo journalctl --vacuum-time=1s
build:
stage: build
......@@ -32,10 +41,6 @@ build:
- name: docker:dind
command: ["--tls=false", "--storage-driver=overlay2", "--mtu=1500", "--data-root=/mnt/volume"]
script:
- docker system prune -a -f --volumes || true
- docker container prune -f || true
- docker network prune -f || true
- docker image prune -a -f || true
- docker build --cache-from=$DOCKER_REPO --no-cache --progress=plain -t $DOCKER_REPO -f flask_ml_api/Dockerfile .
- docker push $DOCKER_REPO
only:
......
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