Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LakeDropsDrupalDev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Docker
LakeDropsDrupalDev
Commits
af878718
Commit
af878718
authored
5 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Fix reset function for each loops (again)
parent
68c8c4f3
No related branches found
Branches containing commit
Tags
v1.11.1
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
run/scripts/update
+7
-7
7 additions, 7 deletions
run/scripts/update
with
7 additions
and
7 deletions
run/scripts/update
+
7
−
7
View file @
af878718
...
...
@@ -5,30 +5,30 @@ function removecontainer {
ID
=
$(
docker container
ls
--all
-q
-f
ancestor
=
$1
|
head
-1
)
if
[[
-n
${
ID
}
]]
;
then
echo
"Removing outdated container ..."
docker
kill
${
ID
}
>
/dev/null
docker
rm
${
ID
}
>
/dev/null
docker
kill
${
ID
}
>
/dev/null
2>&1
docker
rm
${
ID
}
>
/dev/null
2>&1
else
break
fi
done
if
[[
"
$2
"
==
"rmi"
]]
;
then
echo
"Removing outdated image ..."
docker rmi
$1
>
/dev/null
docker rmi
$1
>
/dev/null
2>&1
fi
}
function
cleanup
{
if
[[
$L3D_FORCE_UPDATE
-eq
1
]]
;
then
IMAGEIDS
=(
$(
docker image
ls
-q
registry.lakedrops.com/docker/l3d/php-
${
PHP_VERSION
}
)
)
for
IMAGEID
in
$IMAGEIDS
;
do
docker image
ls
-q
registry.lakedrops.com/docker/l3d/php-
${
PHP_VERSION
}
>
/tmp/reset.lst
for
IMAGEID
in
`
cat
/tmp/reset.lst
`
;
do
removecontainer
$IMAGEID
done
else
IMAGEID
=
$(
docker image
ls
-q
registry.lakedrops.com/docker/l3d/php-
${
PHP_VERSION
}
:
${
VERSION
}
|
head
-1
)
removecontainer
$IMAGEID
rmi
fi
IMAGEIDS
=(
$(
docker image
ls
-q
registry.lakedrops.com/docker/node
)
)
for
IMAGEID
in
$IMAGEIDS
;
do
docker image
ls
-q
registry.lakedrops.com/docker/node
>
/tmp/reset.lst
for
IMAGEID
in
`
cat
/tmp/reset.lst
`
;
do
removecontainer
$IMAGEID
done
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment