Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
KNIGHT
Asyst Moodle Plugin
Commits
c40d4842
Commit
c40d4842
authored
Jan 03, 2025
by
Artem Baranovskyi
Browse files
Image build is optimized.
parent
ee5f4591
Pipeline
#10673
failed
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
c40d4842
...
@@ -12,11 +12,12 @@
...
@@ -12,11 +12,12 @@
stages
:
stages
:
-
build
-
build
-
deploy
variables
:
variables
:
DOCKER_
BUILDKIT
:
1
DOCKER_
DRIVER
:
overlay2
BUILDKIT_INLINE_CACHE
:
1
DOCKER_TLS_CERTDIR
:
"
"
DOCKER_
TMPDIR
:
/mnt/volume
DOCKER_
HOST
:
"
unix:///var/run/docker.sock"
build
:
build
:
stage
:
build
stage
:
build
...
@@ -24,22 +25,16 @@ build:
...
@@ -24,22 +25,16 @@ build:
services
:
services
:
-
name
:
docker:24-dind
-
name
:
docker:24-dind
command
:
[
"
--tls=false"
,
"
--storage-driver=overlay2"
,
"
--mtu=1500"
,
"
--data-root=/mnt/volume"
]
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 info || cat /var/log/docker.log
-
mkdir -p /mnt/volume
-
mkdir -p /mnt/volume
-
mount /dev/vdb /mnt/volume
-
mount /dev/vdb /mnt/volume
|| echo "Already mounted"
-
export DOCKER_TMPDIR=/mnt/volume
-
export DOCKER_TMPDIR=/mnt/volume
-
docker system prune -a -f
-
docker system prune -a -f --volumes ||
true
-
docker volume prune -f
-
df -h
-
df -h
-
ls -la /mnt/volume
tmpfs
:
tmpfs
:
-
/var/lib/docker:rw,noexec,nosuid,size=20g
-
/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 --progress=plain -t flask-backend-full -f flask_ml_api/Dockerfile .
cache
:
cache
:
key
:
build-cache
key
:
build-cache
paths
:
paths
:
...
@@ -51,5 +46,5 @@ deploy:
...
@@ -51,5 +46,5 @@ deploy:
dependencies
:
dependencies
:
-
build
-
build
script
:
script
:
-
docker run -d flask-backend
-
docker run -d flask-backend
-full
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment