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
7984e37b
Commit
7984e37b
authored
4 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
#72
Implement "l3d info"
parent
09dce9b8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Dockerfile
+1
-0
1 addition, 0 deletions
Dockerfile
run/scripts/info
+63
-0
63 additions, 0 deletions
run/scripts/info
run/scripts/list
+6
-8
6 additions, 8 deletions
run/scripts/list
run/scripts/version
+10
-1
10 additions, 1 deletion
run/scripts/version
with
80 additions
and
9 deletions
Dockerfile
+
1
−
0
View file @
7984e37b
...
...
@@ -16,6 +16,7 @@ ADD config.fish /etc/fish/
ADD
start.sh /usr/local/bin/.start
ADD
configIdea.sh /usr/local/bin/.configIdea
ADD
l3dComposer.php /usr/local/bin/.l3dComposer.php
ADD
run/scripts/info /usr/local/bin/l3d
RUN
echo
"Install dorgflow"
&&
\
cd
/var/opt
&&
\
...
...
This diff is collapsed.
Click to expand it.
run/scripts/info
0 → 100755
+
63
−
0
View file @
7984e37b
#!/bin/bash
function
sectionHeader
()
{
echo
""
echo
"======================================================================="
echo
$1
echo
""
echo
""
}
function
sectionFooter
()
{
echo
""
echo
"-----------------------------------------------------------------------"
echo
""
}
function
infol3d
()
{
sectionHeader
"Your L3D"
if
[[
$HOSTMODE
]]
;
then
${
SCRIPTPATH
}
/version
echo
""
${
SCRIPTPATH
}
/list
else
if
[[
"
$1
"
==
"info"
]]
;
then
echo
"Here we will be printing useful information soon !!!"
else
echo
"You're calling L3D inside of L3D, that's not useful."
fi
fi
sectionFooter
}
function
infohost
()
{
sectionHeader
"Your Host"
echo
"OS:
${
L3DHOSTOS
}
"
echo
"User:
${
USERNAME
}
(
${
USERID
}
:
${
GROUPID
}
-
${
GROUPIDS
}
)"
echo
"Home:
${
HOMEDIR
}
"
echo
"Shell:
${
L3DSHELL
}
"
echo
"Workdir:
${
WORKDIR
}
"
echo
"SSH:
${
SSHAUTH
}
-
${
SSHAUTHSOCK
}
"
sectionFooter
}
function
infodocker
()
{
sectionHeader
"Your Docker"
docker info 2>/dev/null |
grep
"Server Version:"
docker info 2>/dev/null |
grep
"Operating System:"
docker info 2>/dev/null |
grep
"OSType:"
docker info 2>/dev/null |
grep
"Architecture:"
sectionFooter
}
SCRIPTPATH
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
&&
pwd
-P
)
"
HOSTMODE
=
true
if
[[
-f
${
SCRIPTPATH
}
/selfupdate
]]
;
then
HOSTMODE
=
false
fi
infol3d
$1
if
[[
$HOSTMODE
]]
;
then
infohost
infodocker
fi
This diff is collapsed.
Click to expand it.
run/scripts/list
+
6
−
8
View file @
7984e37b
...
...
@@ -8,12 +8,11 @@ function listprojects() {
echo
"No active L3D projects found."
return
fi
echo
"Active L3D projects:"
echo
"===================="
echo
""
printf
"Active L3D projects:"
for
CONTAINERID
in
`
cat
/tmp/l3d.lst
`
;
do
docker inspect
$CONTAINERID
| jq
-r
.[0].Config.Hostname |
cut
-d
'-'
-f
1
printf
" %s"
"
$(
docker inspect
$CONTAINERID
| jq
-r
.[0].Config.Hostname |
cut
-d
'-'
-f
1
)
"
done
echo
""
rm
/tmp/l3d.lst
}
...
...
@@ -25,12 +24,11 @@ function listnetworks() {
echo
"No active L3D networks found."
return
fi
echo
"Active L3D networks:"
echo
"===================="
echo
""
printf
"Active L3D networks:"
for
NETWORKID
in
`
cat
/tmp/l3d.lst
`
;
do
docker inspect
$NETWORKID
| jq
-r
.[0].Name |
cut
-d
'_'
-f
2
printf
" %s"
"
$(
docker inspect
$NETWORKID
| jq
-r
.[0].Name |
cut
-d
'_'
-f
2
)
"
done
echo
""
rm
/tmp/l3d.lst
}
...
...
This diff is collapsed.
Click to expand it.
run/scripts/version
+
10
−
1
View file @
7984e37b
#!/bin/bash
echo
"
${
VERSION
}
"
echo
"Version:
${
VERSION
}
"
NEWVERSION
=
$(
curl
-s
"https://gitlab.lakedrops.com/api/v4/projects/282/repository/tags?order_by=updated&search=^v"
| jq
-r
.[0].name
)
if
[[
"
$NEWVERSION
"
==
"
$VERSION
"
]]
;
then
return
fi
echo
""
echo
"A new version is available:
$NEWVERSION
"
echo
" run 'l3d selfupdate'"
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