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
57831658
Commit
57831658
authored
4 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
#70
Add a list command
parent
30431cb9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
run/scripts/help
+1
-1
1 addition, 1 deletion
run/scripts/help
run/scripts/list
+38
-0
38 additions, 0 deletions
run/scripts/list
with
39 additions
and
1 deletion
run/scripts/help
+
1
−
1
View file @
57831658
...
...
@@ -6,5 +6,5 @@ echo ""
echo
"Version:
${
VERSION
}
"
echo
"Support: https://gitlab.lakedrops.com/docker/l3d"
echo
""
echo
"Usage: l3d [ help | version | selfupdate [VERSION] | update | reset | PROJECTNAME | delete PROJECTNAME ]"
echo
"Usage: l3d [ help | version | selfupdate [VERSION] | update | reset | PROJECTNAME | delete PROJECTNAME ]
| list
"
echo
""
This diff is collapsed.
Click to expand it.
run/scripts/list
0 → 100755
+
38
−
0
View file @
57831658
#!/bin/bash
function
listprojects
()
{
echo
""
docker container
ls
--all
-q
-f
name
=
_l3d
$
>
/tmp/l3d.lst
IDS
=
$(
cat
/tmp/l3d.lst
)
if
[[
!
-n
${
IDS
}
]]
;
then
echo
"No active L3D projects found."
return
fi
echo
"Active L3D projects:"
echo
"===================="
echo
""
for
CONTAINERID
in
`
cat
/tmp/l3d.lst
`
;
do
docker inspect
$CONTAINERID
| jq
-r
.[0].Config.Hostname |
cut
-d
'-'
-f
1
done
rm
/tmp/l3d.lst
}
function
listnetworks
()
{
echo
""
docker network
ls
-q
-f
name
=
^traefik_
>
/tmp/l3d.lst
IDS
=
$(
cat
/tmp/l3d.lst
)
if
[[
!
-n
${
IDS
}
]]
;
then
echo
"No active L3D networks found."
return
fi
echo
"Active L3D networks:"
echo
"===================="
echo
""
for
NETWORKID
in
`
cat
/tmp/l3d.lst
`
;
do
docker inspect
$NETWORKID
| jq
-r
.[0].Name |
cut
-d
'_'
-f
2
done
rm
/tmp/l3d.lst
}
listprojects
listnetworks
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