Project 'ulrike.pado/asyst-moodle-plugin' was moved to 'knight/asyst-moodle-plugin'. Please update any links and bookmarks that may still have the old path.
Commit cd283fa0 authored by Artem Baranovskyi's avatar Artem Baranovskyi
Browse files

Image build is optimized.

parent 1484b0dc
No related merge requests found
Pipeline #10758 failed with stages
in 1 minute and 20 seconds
Showing with 9 additions and 5 deletions
+9 -5
......@@ -31,9 +31,6 @@ before_script:
- docker network prune -f || true
- docker image prune -a -f || true
- docker builder prune -f || true
- apt-get clean
- rm -rf /var/lib/apt/lists/*
- rm -rf /root/.cache/pip
after_script:
- docker system prune -a -f --volumes || true
......@@ -44,11 +41,13 @@ after_script:
build:
stage: build
image: docker:latest
image: ubuntu:latest
services:
- name: docker:dind
command: ["--host=tcp://0.0.0.0:2375", "--tls=false", "--storage-driver=overlay2", "--mtu=1500", "--data-root=/mnt/volume"]
script:
- apt-get update
- apt-get install -y docker.io
- docker buildx create --use
- docker build --cache-from=22baar1mst/asyst-nlp-grader --no-cache --progress=plain -t 22baar1mst/asyst-nlp-grader:latest -f flask_ml_api/Dockerfile .
- docker push 22baar1mst/asyst-nlp-grader:latest
......@@ -57,11 +56,13 @@ build:
deploy:
stage: deploy
image: docker:latest
image: ubuntu:latest
services:
- name: docker:dind
command: ["--tls=false", "--storage-driver=overlay2", "--mtu=1500", "--data-root=/mnt/volume"]
script:
- apt-get update
- apt-get install -y docker.io
- docker pull 22baar1mst/asyst-nlp-grader:latest
- docker run -d 22baar1mst/asyst-nlp-grader:latest
only:
......
......@@ -9,6 +9,9 @@ ENV PATH="$PATH:/root/.cargo/bin"
RUN /root/.cargo/bin/rustup toolchain install stable --profile minimal --no-self-update
RUN /root/.cargo/bin/rustup --version
RUN /root/.cargo/bin/cargo --version
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential python3-venv && \
apt-get clean && \
......
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