Te4g / docker-sshfs-macos

Mount a remote directory inside a docker container and serve it with nginx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Requirement

Ensure SSH Agent is Running on Host: Before you run your container, make sure the SSH agent is running on the host and your key is added.

eval $(ssh-agent -s)
ssh-add

Build

docker build -t te4g/mount-ssh .

Usage

docker run --rm --privileged \
  -v /run/host-services/ssh-auth.sock:/run/host-services/ssh-auth.sock \
  -e ADDRESS=$ADDRESS \
  -e DIRECTORY=$DIRECTORY \
  -e SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock \
  -p 9999:80 \
  te4g/mount-ssh

or set the environment variables in a .env file and run:

docker compose up -d --build

About

Mount a remote directory inside a docker container and serve it with nginx


Languages

Language:Dockerfile 73.7%Language:Shell 26.3%