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
bcc842f8
Commit
bcc842f8
authored
Jan 05, 2025
by
Artem Baranovskyi
Browse files
Image build is optimized.
parent
92c02780
Pipeline
#10723
failed with stages
in 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
bcc842f8
...
@@ -19,13 +19,24 @@ variables:
...
@@ -19,13 +19,24 @@ variables:
DOCKER_DRIVER
:
overlay2
DOCKER_DRIVER
:
overlay2
DOCKER_TLS_CERTDIR
:
"
"
DOCKER_TLS_CERTDIR
:
"
"
DOCKER_DAEMON_TIMEOUT
:
300
DOCKER_DAEMON_TIMEOUT
:
300
# DOCKER_HOST: "unix:///var/run/docker.sock"
DOCKER_HOST
:
"
tcp://localhost:2375"
DOCKER_HOST
:
"
tcp://localhost:2375"
# DOCKER_HOST: "unix:///var/run/docker.sock"
DOCKER_OPTS
:
"
--data-root=/mnt/volume/docker-data"
DOCKER_OPTS
:
"
--data-root=/mnt/volume/docker-data"
DOCKER_MEMORY
:
"
4g"
DOCKER_MEMORY
:
"
4g"
DOCKER_CPUS
:
"
2"
DOCKER_CPUS
:
"
2"
before_script
:
-
mkdir -p ~/.docker
-
echo $DOCKER_CONFIG_JSON | base64 -d > ~/.docker/config.json
-
echo $DOCKER_PW | docker login -u $DOCKER_USER --password-stdin
-
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
build
:
build
:
stage
:
build
image
:
docker:dind
image
:
docker:dind
services
:
services
:
-
name
:
docker:dind
-
name
:
docker:dind
...
@@ -35,6 +46,7 @@ build:
...
@@ -35,6 +46,7 @@ build:
-
docker build -t $DOCKER_REPO:flask .
-
docker build -t $DOCKER_REPO:flask .
containerize
:
containerize
:
stage
:
containerize
image
:
docker:dind
image
:
docker:dind
services
:
services
:
-
docker:dind
-
docker:dind
...
@@ -44,6 +56,7 @@ containerize:
...
@@ -44,6 +56,7 @@ containerize:
-
docker push $DOCKER_REPO:flask
-
docker push $DOCKER_REPO:flask
deploy
:
deploy
:
stage
:
deploy
image
:
docker:dind
image
:
docker:dind
services
:
services
:
-
docker:dind
-
docker:dind
...
@@ -61,4 +74,6 @@ deploy:
...
@@ -61,4 +74,6 @@ deploy:
sudo docker rm flask-container ||
true
sudo docker rm flask-container ||
true
sudo docker pull $DOCKER_REPO:flask
sudo docker pull $DOCKER_REPO:flask
sudo docker run --name flask-container -d -p 5000:5000 $DOCKER_REPO:flask
sudo docker run --name flask-container -d -p 5000:5000 $DOCKER_REPO:flask
"
"
\ No newline at end of file
only
:
-
master
\ No newline at end of file
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