Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
MDANSE
Commits
49765107
Commit
49765107
authored
Jun 01, 2018
by
eric pellegrini
Browse files
Added script for cleaning docker images and contianers after build
parent
215788ca
Pipeline
#3795
failed with stages
in 12 minutes and 56 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
49765107
...
...
@@ -203,9 +203,7 @@ clean_docker:
stage
:
clean
when
:
always
script
:
-
docker rm `docker ps -q -f "status=exited"`
-
docker images -a --format "{{.Repository}}:{{.Tag}}" | grep _mdanse_ | xargs docker rmi -f
-
docker rmi `docker images -q -f "dangling=true"`
-
${CI_PROJECT_DIR}/BuildServer/Docker/clean.sh
tags
:
-
docker
-
sci
...
...
BuildServer/Docker/clean.sh
0 → 100644
View file @
49765107
# Return the docker containers that are exited
exited_containers
=
`
docker ps
-q
-f
"status=exited"
`
# If some have been found, remove them
if
[
-n
"
$exited_containers
"
]
then
docker
rm
-f
${
exited_containers
}
fi
# Return the docker images corresponding to MDANSE
images
=
`
docker images
-a
--format
"{{.Repository}}:{{.Tag}}"
|
grep
_mdanse_
`
# If some have been found, remove them
if
[
-n
"
$images
"
]
then
docker rmi
-f
${
images
}
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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