Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Dockerfiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Picasoft
Technique
Dockerfiles
Commits
f9aab502
Verified
Commit
f9aab502
authored
4 years ago
by
Quentin Duchemin
Browse files
Options
Downloads
Patches
Plain Diff
[docker_test.sh] Fix logic for external volumes
parent
d543f2eb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docker_test.sh
+8
-5
8 additions, 5 deletions
docker_test.sh
with
8 additions
and
5 deletions
docker_test.sh
+
8
−
5
View file @
f9aab502
...
@@ -44,9 +44,10 @@ if [[ -d "$1" ]]; then
...
@@ -44,9 +44,10 @@ if [[ -d "$1" ]]; then
# Go to the folder of the service which will be tested
# Go to the folder of the service which will be tested
cd
"
$1
"
cd
"
$1
"
echo
-e
"
\n
==== Stop and remove existing containers ===="
create_dumb_secrets
create_dumb_secrets
docker-compose down
echo
-e
"
\n
==== Stop and remove existing containers and volumes ===="
docker-compose down
-v
cd
..
cd
..
else
else
echo
"WARNING : directory does not exist (
$1
) ; will try to pull"
echo
"WARNING : directory does not exist (
$1
) ; will try to pull"
...
@@ -82,9 +83,11 @@ done
...
@@ -82,9 +83,11 @@ done
echo
-e
"
\n
==== Remove and re-create named external volumes ===="
echo
-e
"
\n
==== Remove and re-create named external volumes ===="
for
v
in
$(
docker-compose config
--volumes
)
;
do
for
v
in
$(
docker-compose config
--volumes
)
;
do
# Don't fail if volume does not exists
if
[
grep
$v
-A
1 docker-compose.yml |
grep
'external'
]
;
then
docker volume
rm
"
$v
"
||
true
# Don't fail if volume does not exists
docker volume create
"
$v
"
docker volume
rm
"
$v
"
||
true
docker volume create
"
$v
"
fi
done
done
echo
-e
"
\n
==== Remove old images ===="
echo
-e
"
\n
==== Remove old images ===="
...
...
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