Skip to content
Snippets Groups Projects
Commit 7bdd6170 authored by jurgenhaas's avatar jurgenhaas
Browse files

#25 Fix bug in pwd syntax and update readme

parent 87b27536
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ Here we have to circumwent some limitations that come with Docker for Mac:
1. Docker for Mac is not able to mount certain directories and one of those is anything underneath `/usr`. Therefore you have to use a different directory where the L3D script and some additional files get stored.
2. Docker for Mac does not properly mount sockets such that SSH agent can not be used inside of Docker containers the same way this is being done on Linux platforms. There are many workarounds available and we have integrated the approach from [mariusgrigaitis](https://github.com/mariusgrigaitis/docker-mac-ssh-auth-sock) into this project.
This requires [socat](https://linux.die.net/man/1/socat). You can install that with `sudo brew install socat` or `sudo port install socat` or any other method that is applicable to you specific Mac. After installation make sure that `socat` can be found in your search path. If it got installed in a directory that isn't in the path, you can create a symbolic link to it into `/usr/local/bin`.
This requires [socat](https://linux.die.net/man/1/socat). You can install that with `brew install socat` or `sudo port install socat` or any other method that is applicable to you specific Mac. After installation make sure that `socat` can be found in your search path. If it got installed in a directory that isn't in the path, you can create a symbolic link to it into `/usr/local/bin`.
Then use the following command to install L3D (replace `myname` with your correct username:
......@@ -31,7 +31,23 @@ Then use the following command to install L3D (replace `myname` with your correc
docker run -v /User/myname/bin:/setup --rm registry.lakedrops.com/docker/l3d/setup:latest
```
Then make sure that the directory `/User/myname/bin` is included in the PATH environment variable or create a symbolic link in `/usr/local/bin`. If you work with a symbolic link, MacOS also requires [coreutils](https://de.wikipedia.org/wiki/GNU_Core_Utilities) which can be installed with `sudo brew install coreutils` or `sudo port install coreutils`.
Then make sure that the directory `/User/myname/bin` is included in the PATH environment variable or create a symbolic link in `/usr/local/bin`. If you work with a symbolic link, MacOS also requires [coreutils](https://de.wikipedia.org/wiki/GNU_Core_Utilities) which can be installed with `brew install coreutils` or `sudo port install coreutils`.
## Verifying SSH
As you will require SSH functionality in most development environments, let's make sure that this really works. In order to find out if your host is properly configured to use (and forward) SSH authentication, you should call `ssh-add -l` and see if it lists your public key(s). if it doesn't, just call `ssh-add` to add you public keys to the ssh agent. If this doesn't persist after a reboot of you host on MacOS, then please follow [these instructions](https://apple.stackexchange.com/questions/253779/macos-10-12-sierra-will-not-forget-my-ssh-keyfile-passphrase/254619#254619).
To test SSH easily, you can do something like this:
```shell script
$> ssh -T git@github.com
# Hi yourusername! You've successfully authenticated, but GitHub does not provide shell access.
$> ssh -T git@gitlab.com
# Welcome to GitLab, @yourusername!
```
The same test also works with other hosts where your public key is configured as your authentication method. Please note, you can repeat these SSH tests inside the L3D container later on as well and they should produce the very same results.
## Usage
......
......@@ -7,7 +7,7 @@ case "${L3DHOSTOS}" in
Darwin*)
if ! which greadlink >/dev/null; then
# This only works if no symlinks are involved.
SCRIPTPATH="$(cd "$(dirname "$0")" && pwd -p)"
SCRIPTPATH="$(cd "$(dirname "$0")" && pwd -P)"
else
# This works on MacOS when coreutils is installed.
SCRIPTPATH="$(dirname "$(greadlink -f "$0")")"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment