https://github.com/eea/eea.docker.scp-server
Restricted SSH server which allows SCP / SFTP access only. This image is meant to be used together with the httpd:2.4 image
https://github.com/eea/eea.docker.scp-server
Last synced: 26 days ago
JSON representation
Restricted SSH server which allows SCP / SFTP access only. This image is meant to be used together with the httpd:2.4 image
- Host: GitHub
- URL: https://github.com/eea/eea.docker.scp-server
- Owner: eea
- Created: 2016-04-09T17:08:49.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-15T09:17:37.000Z (about 10 years ago)
- Last Synced: 2025-01-24T20:42:53.172Z (over 1 year ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 2
- Watchers: 4
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
SCP server
==========
Restricted SSH server which allows SCP / SFTP / RSYNC access only. This image is meant to provide an ability to update content in data containers. You would normally make a constellation of your service, a data container, and the scp-server container.
The scp-server container is configured at runtime with environment variables to match the configuration of the main service. The environment variables are:
* AUTHORIZED_KEYS - contains the public SSH keys for the users who will be allowed to upload.
* DATADIR - The location where relative paths start from.
* USERID - The numeric id of the `data` account. Defaults to 33.
* GROUPID - The numeric id of the `data` group. Defaults to 33.
Original code and idea is from https://github.com/gituser173/docker-scp-server.
Running
-------
It is easiest if you use docker-compose. Then you can specify the authorized SSH keys in a block declaration:
docker-compose.yml file:
```
scpserver:
image: eeacms/scp-server
ports:
- :22
environment:
AUTHORIZED_KEYS: |
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA4FhFro3H....vg0hrC3s0= My First CERT
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAteQ38qb7....uC839w== Second authorized key
DATADIR: /usr/local/apache2/htdocs
USERID: 500
GROUPID: 500
volumes_from:
- htdocs
httpd:
image: httpd
ports:
- 80:80
volumes_from:
- htdocs
htdocs:
image: tianon/true
volumes:
- :/usr/local/apache2/htdocs
```
When started you can upload data into the container (e.g. via scp) as the `data` user:
scp -P data@:
sftp -P data@
rsync --rsh="ssh -p " data@localhost: