Pull docker image:
docker pull denibertovic/tmate
Run container:
WORKDIR=/path/to/dir docker run --rm -it \
-v $WORKDIR:/opt/workdir \
-e LOCAL_USER_ID=$(id -u $USER)
denibertovic/tmate
tamte
NOTE: This will mount the $WORKDIR that you specify into the docker
container's /opt/workdir directoy. That way the user connecting to your session
can only see the filesystem inside the container in that directoy.
Or add something like this to your ~/.zshrc:
share-session () {
if (( $# == 0 ))
then
echo Usage: $0 WORKDIR;
else
docker run --rm -it -v $1:/opt/workdir -e LOCAL_USER_ID=$(id -u $USER) denibertovic/tmate tmate
fi;
}
and then just run:
share-session /path/to/shared/dir
NOTE: once inside run tmate show-messages to get a list of ssh connection strings that you can share.
NOTE: You can also mount in you .vim directory and .vimrc file the same way.
make buildWORKDIR=/path/to/dir make runContent type
Image
Digest
Size
112 MB
Last updated
almost 9 years ago
docker pull denibertovic/tmate