Sign inSign up

dhaks/centos7-sftp

By dhaks

•Updated about 7 years ago

Image
0

255

dhaks/centos7-sftp repository overview

⁠centos7-sftp

This image has centos7 running OpenSSL Sftp server configured on port 22, you must supply a username, share directory and password in order to run this image. Note: Please use docker compose in windows machine.

⁠Build

Please use the script build.sh to build the docker image

Note: build.sh file create a docker image named "dhaks\centos7-sftp:1.0.0"


⁠Run

⁠Run using Docker

⁠Step 1 Create directory share
mkdir -m 766 share 
⁠Step 2 Run docker sftp container
docker run \
    -v share:/home/foo/share \
    -p 2222:22 -d dhaks/centos7-sftp:1.0.0 \
    foo:123:1001

Note: username is "foo" with password "123" and userid "1001"

⁠Run using Docker-compose

⁠Prerequisite
  • directory name "share" mkdir share
  • docker-compose installed
⁠Step 1 Create directory share
mkdir -m 766 share 

⁠Step 2: Create docker-compose .yml file
⁠docker-compose.yml
version: '2'
services:
  sftp:
    image: dhaks/centos7-sftp:1.0.0
    hostname: sftp
    ports:
      - "2222:22"
    volumes:
      - ./share:/home/foo/share
    entrypoint: ["/root/run","foo:123:1001" ]
⁠Step 3: Start container
docker-compose up -d
⁠Step 4: login
sftp -P 2222 foo@localhost

Tag summary

Content type

Image

Digest

Size

78.7 MB

Last updated

about 7 years ago

docker pull dhaks/centos7-sftp