Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
allgo
allgo
Commits
3121a4bc
Commit
3121a4bc
authored
Sep 27, 2017
by
BAIRE Anthony
Browse files
add shell -r (to run as root)
parent
b723bdba
Changes
1
Show whitespace changes
Inline
Side-by-side
shell
View file @
3121a4bc
#!/bin/bash
if
[
"
$1
"
=
"-r"
]
;
then
shift
user
=
"-u root"
else
user
=
fi
CTR
=
"
$1
"
if
[
-z
"
$CTR
"
]
;
then
...
...
@@ -9,4 +16,4 @@ fi
set
-ex
fig up
-d
"
$CTR
"
docker
exec
-t
-i
--
"
$CTR
"
/bin/bash
docker
exec
-t
-i
$user
--
"
$CTR
"
/bin/bash
Write
Preview
Supports
Markdown
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