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
aa10a96e
Commit
aa10a96e
authored
5 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
#25
Improve code to support ssh key forwarding
parent
7f3cf17c
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
setup/scripts/l3d
+20
-9
20 additions, 9 deletions
setup/scripts/l3d
setup/scripts/prepareMac4L3d
+0
-8
0 additions, 8 deletions
setup/scripts/prepareMac4L3d
with
20 additions
and
17 deletions
setup/scripts/l3d
+
20
−
9
View file @
aa10a96e
#!/bin/bash
# Credit to https://github.com/uber-common/docker-ssh-agent-forward
# for this script to make L3D working on MaxOs/OSX too.
SCRIPTPATH
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
;
pwd
-P
)
"
L3DHOSTOS
=
"
$(
uname
-s
)
"
case
"
${
L3DHOSTOS
}
"
in
Linux
*
)
SSHAUTH
=
${
SSH_AUTH_SOCK
}
SSHAUTHSOCK
=
/ssh-agent
;;
Darwin
*
)
${
SCRIPTPATH
}
/prepareMac4L3d
SSHAUTH
=
ssh-agent
SSHAUTHSOCK
=
/ssh-agent/ssh-agent.sock
;;
*
)
echo
"Unkown OS"
exit
esac
ID
=
$(
docker container
ls
--all
-q
-f
name
=
^l3drun
$)
if
[[
!
-n
${
ID
}
]]
;
then
SCRIPTPATH
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
;
pwd
-P
)
"
${
SCRIPTPATH
}
/prepareMac4L3d
docker run
--name
=
l3drun
-dt
--rm
\
--env
SCRIPTPATH
=
${
SCRIPTPATH
}
\
--volume
/var/run/docker.sock:/var/run/docker.sock
\
...
...
@@ -12,13 +30,6 @@ fi
if
[[
-f
".env"
]]
;
then
export
$(
cat
.env | xargs
)
>
/dev/null 2>&1
fi
if
[[
"
$L3DHOSTOS
"
==
"Linux"
]]
;
then
SSHAUTH
=
${
SSH_AUTH_SOCK
}
SSHAUTHSOCK
=
/ssh-agent
else
SSHAUTH
=
ssh-agent
SSHAUTHSOCK
=
/ssh-agent/ssh-agent.sock
fi
docker
exec
-it
\
--env
HOMEDIR
=
${
HOME
}
\
--env
WORKDIR
=
${
PWD
}
\
...
...
This diff is collapsed.
Click to expand it.
setup/scripts/prepareMac4L3d
+
0
−
8
View file @
aa10a96e
#!/usr/bin/env bash
# Credit to https://github.com/uber-common/docker-ssh-agent-forward
# for this script to make L3D working on MaxOs/OSX too.
export
L3DHOSTOS
=
"
$(
uname
-s
)
"
if
[[
"
$L3DHOSTOS
"
==
"Linux"
]]
;
then
exit
fi
set
-eo
pipefail
IMAGE_NAME
=
uber/ssh-agent-forward:latest
...
...
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