DEV-105: Set workdir to pwd @nitrocode (#753)
what
- Add workdir setting and default it to the present working directory from where the container was started
- Implementation works without gnu realpath
- Implementation works with or without gnu sed
- Implementation works even if
GEODESIC_DOCKER_EXTRA_ARGS
is set.
why
- The benefit with this is that we start geodesic, we're automatically dropped in a path with in the container relative to our current working directory on the native filesystem
- This is a common configuration across customers and other toolbox implementations like the fedora toolbox.
- Original solution was to update
GEODESIC_DOCKER_EXTRA_ARGS
in theMakefile
which only runs when runningmake run|build|all
and not when running the wrapper directly.
references
commands
$ echo ${GEODESIC_WORKDIR:-/localhost/${PWD#$HOME/}}
/localhost/git/github/cloudposse/geodesic/rootfs/templates
$ unset ATMOS_BASE_PATH
$ source atmos.sh
Set ATMOS_BASE_PATH = .
$ source atmos.sh