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
8051d1e1
Commit
8051d1e1
authored
5 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
#25
Improve MacOS support and fix some bugs
parent
b5f03a4c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
setup/scripts/l3d
+15
-2
15 additions, 2 deletions
setup/scripts/l3d
setup/scripts/prepareMac4L3d
+3
-3
3 additions, 3 deletions
setup/scripts/prepareMac4L3d
with
18 additions
and
5 deletions
setup/scripts/l3d
+
15
−
2
View file @
8051d1e1
#!/bin/bash
SCRIPTPATH
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
;
pwd
-P
)
"
L3DHOSTOS
=
"
$(
uname
-s
)
"
SSHAUTH
=
${
SSH_AUTH_SOCK
}
SSHAUTHSOCK
=
/ssh-agent
L3DHOSTOS
=
"
$(
uname
-s
)
"
case
"
${
L3DHOSTOS
}
"
in
Darwin
*
)
if
!
which greadlink
>
/dev/null
;
then
# This only works if no symlinks are involved.
SCRIPTPATH
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
&&
pwd
-p
)
"
else
# This works on MacOS when coreutils is installed.
SCRIPTPATH
=
"
$(
dirname
"
$(
greadlink
-f
"
$0
"
)
"
)
"
fi
${
SCRIPTPATH
}
/prepareMac4L3d
if
[[
$?
>
0
]]
;
then
exit
$?
fi
;;
*
)
# This works in most cases, i.e. on Linux.
SCRIPTPATH
=
"
$(
dirname
"
$(
readlink
-f
"
$0
"
)
"
)
"
esac
ID
=
$(
docker container
ls
--all
-q
-f
name
=
^l3drun
$)
...
...
This diff is collapsed.
Click to expand it.
setup/scripts/prepareMac4L3d
+
3
−
3
View file @
8051d1e1
...
...
@@ -2,9 +2,9 @@
# Credit: https://github.com/mariusgrigaitis/docker-mac-ssh-auth-sock
SOCATID
=
$(
docker container
ls
--all
-q
-f
name
=
^
l3d_socat
$
)
SOCATID
=
$(
docker container
ls
--all
-q
-f
name
=
l3d_socat
)
if
[[
-n
${
SOCATID
}
]]
;
then
return
exit
0
fi
if
!
which socat
>
/dev/null
;
then
...
...
@@ -75,4 +75,4 @@ echo "Starting socket proxy."
#
# This is not really reliable because forwarding input/output over stdin/stdout does not allow for multiple communications
# at the same time. It fails when doing multiple connections to $SSH_AUTH_SOCK at the same time.
exec
socat
"EXEC:
\"
docker run -i -
d --rm --restart unless-stopped
--name l3d_socat -v
$(
dirname
$SSH_AUTH_SOCK
)
:
$(
dirname
$SSH_AUTH_SOCK
)
alpine/socat UNIX-LISTEN:
$SSH_AUTH_SOCK
,reuseaddr,fork -
\"
"
"EXEC:
\"
socat - UNIX:
${
SSH_AUTH_SOCK
}
\"
"
exec
socat
"EXEC:
\"
docker run -i -
-rm
--name l3d_socat -v
$(
dirname
$SSH_AUTH_SOCK
)
:
$(
dirname
$SSH_AUTH_SOCK
)
alpine/socat UNIX-LISTEN:
$SSH_AUTH_SOCK
,reuseaddr,fork -
\"
"
"EXEC:
\"
socat - UNIX:
${
SSH_AUTH_SOCK
}
\"
"
&
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