Running Buru SFTP Server in Docker
Rebex Buru SFTP Server can run natively in Windows Docker images, e.g. Nano Server.
Use portable edition, make any adjustments to the configuration files, add a license. Then copy the server to the Docker image.
You can use the following bash / fish shell script as a starting point.
The example generates the server keys before the docker image is created. If you wish to deploy on multiple servers, be sure to generate the server keys for each server separately, for example on container startup.
# This example will use C:\demo
mkdir /c/demo
cd /c/demo
# Download and unzip the portable edition
mkdir burusftp && cd burusftp
wget -qO- https://www.rebex.net/buru-sftp-server/download/pkg/trial-RebexBuruSftpServer-x64-latest.zip | bsdtar -xvf-
cd ..
# Create Dockerfile
echo > Dockerfile '
FROM mcr.microsoft.com/windows/nanoserver:ltsc2019
WORKDIR /app
ENTRYPOINT ["burusftp.exe", "run"]
COPY burusftp /app'
# Create SFTP user data directory
mkdir userdata
# Initialize Buru SFTP Server
./burusftp/burusftp.exe init
# Build and run docker image
docker build -t buru-app .
docker run -d -p 22:22 --name buru --mount 'type=bind,src=C:\demo\userdata,dst=C:\userdata' buru-app
# Add user in running container
docker exec buru 'C:\app\burusftp.exe' user add guybrush --password elaine --root-dir 'C:\userdata\guybrush'
mkdir userdata/guybrush
touch userdata/guybrush/hello_elaine
# Force fingerprint renewal
ssh-keygen -R localhost
# Connect to Buru SFTP Server running in docker (use 'elaine' as password)
ssh guybrush@localhost
# Show contents of Guybrush's home directory - it should display 'hello_elaine' file created earlier
ls
exit
# Stop and delete the container
docker stop buru
docker rm buru
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.