专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

emberstack/sftp Docker 镜像 - 轩辕镜像

sftp
emberstack/sftp
emberstack
SFTP (SSH File Transfer Protocol) server using OpenSSH
24 收藏0 次下载
💣 CI/CD 卡在拉镜像?问题不在代码,在镜像源
镜像简介版本下载
💣 CI/CD 卡在拉镜像?问题不在代码,在镜像源

SFTP (SSH File Transfer Protocol) server using OpenSSH

This project provides a Docker image for hosting a SFTP server. Included are Docker (docker-cli and docker-compose) and Kubernetes (kubectl and helm) deployment scripts

![Build Status]([] ![Release]([] ![Docker Image]([] ![Docker Pulls]([] ![slack]([***]

Supports architectures: amd64, arm and arm64

Support

If you need help or found a bug, please feel free to open an issue on the emberstack/docker-sftp GitHub project.

You can also join our Slack workspace and talk to us:
![slack]([***]

Usage

The SFTP server can be easily deployed to any platform that can host containers based on Docker. Below are deployment methods for:

  • Docker CLI
  • Docker-Compose
  • Kubernetes using Helm (recommended for Kubernetes)

Process:

  1. Create server configuration
  2. Mount volumes as needed
  3. Set host file for consistent server fingerprint
Configuration

The SFTP server uses a json based configuration file for default server options and to define users. This file has to be mounted on /app/config/sftp.json inside the container. Environment variable based configuration is not supported (see the Advanced Configuration section below for the reasons).

Below is the simplest configuration file for the SFTP server:

json
{
    "Global": {
        "Chroot": {
            "Directory": "%h",
            "StartPath": "sftp"
        },
        "Directories": ["sftp"]
    },
    "Users": [
        {
            "Username": "demo",
            "Password": "demo"
        }
    ]
}

This configuration creates a user demo with the password demo. A directory "sftp" is created for each user in the own home and is accessible for read/write. The user is chrooted to the /home/demo directory. Upon connect, the start directory is sftp.

You can add additional users, default directories or customize start directories per user. You can also define the UID and GID for each user. See the Advanced Configuration section below for all configuration options.

Deployment using Docker CLI

Simple Docker CLI run

shellsession
$ docker run -p 22:22 -d emberstack/sftp --name sftp

This will start a SFTP in the container sftp with the default configuration. You can connect to it and login with the user: demo and password: demo.

Provide your configuration

shellsession
$ docker run -p 22:22 -d emberstack/sftp --name sftp -v /host/sftp.json:/app/config/sftp.json:ro

This will override the default (/app/config/sftp.json) configuration with the one from the host /host/sftp.json.

Mount a directory from the host for the user 'demo'

shellsession
$ docker run -p 22:22 -d emberstack/sftp --name sftp -v /host/sftp.json:/app/config/sftp.json:ro -v /host/demo:/home/demo/sftp

This will mount the demo directory from the host on the sftp directory for the "demo" user.

Deployment using Docker Compose

Simple docker-compose configuration

Create a docker-compose configuration file:

yaml
version: '3'
services:
  sftp:
    image: "emberstack/sftp"
    ports:
      - "22:22"
    volumes:
      - ../config-samples/sample.sftp.json:/app/config/sftp.json:ro

And run it using docker-compose

shellsession
$ docker-compose -p sftp -f docker-compose.yaml up -d

The above configuration is available in the deploy\docker-compose folder in this repository. You can use it to start customizing the deployment for your environment.

Deployment to Kubernetes using Helm

Use Helm to install the latest released chart:

shellsession
$ helm repo add emberstack [***]
$ helm repo update
$ helm upgrade --install sftp emberstack/sftp

You can customize the values of the helm deployment by using the following Values:

ParameterDescriptionDefault
nameOverrideOverrides release name""
fullnameOverrideOverrides release fullname""
image.repositoryContainer image repositoryemberstack/sftp
image.tagContainer image taglatest
image.pullPolicyContainer image pull policyAlways if image.tag is latest, else IfNotPresent
storage.volumesDefines additional volumes for the pod{}
storage.volumeMountsDefines additional volumes mounts for the sftp container{}
configurationAllows the in-line override of the configuration valuesnull
configuration.Global.Chroot.DirectoryGlobal chroot directory for the sftp user group. Can be overriden per-user"%h"
configuration.Global.Chroot.StartPathStart path for the sftp user group. Can be overriden per-user"sftp"
configuration.Global.DirectoriesDirectories that get created for all sftp users. Can be appended per user["sftp"]
configuration.Global.HostKeys.Ed25519Set the server's ED25519 private key""
configuration.Global.HostKeys.RsaSet the server's RSA private key""
configuration.UsersArray of users and their propertiesContains demo user by default
configuration.Users[].UsernameSet the user's usernameN/A
configuration.Users[].PasswordSet the user's password. If empty or null, password authentication is disabledN/A
configuration.Users[].PasswordIsEncryptedtrue or false. Indicates if the password value is already encryptedfalse
configuration.Users[].AllowedHostsSet the user's allowed hosts. If empty, any host is allowed[]
configuration.Users[].PublicKeysSet the user's public keys[]
configuration.Users[].UIDSets the user's UID.null
configuration.Users[].GIDSets the user's GID. A group is created for this value and the user is includednull
configuration.Users[].ChrootIf set, will override global Chroot settings for this user.null
configuration.Users[].DirectoriesArray of additional directories created for this usernull
initContainersAdditional initContainers for the pod{}
resourcesResource limits{}
nodeSelectorNode labels for pod assignment{}
tolerationsToleration labels for pod assignment[]
affinityNode affinity for pod assignment{}

Find us on Helm Hub

Advanced Configuration

TODO: This section is under development due to the number of configuration options being added. Please open an issue on the emberstack/docker-sftp project if you need help.

查看更多 sftp 相关镜像 →
atmoz/sftp logo
atmoz/sftp
易于使用的SFTP服务器
5211B+ pulls
上次更新:未知
writl/sftp logo
writl/sftp
安全可配置的SFTP服务器Docker容器,支持文件传输,可自定义用户ID和组ID。
151M+ pulls
上次更新:未知
corilus/sftp logo
corilus/sftp
安全共享文件,支持完整的rsyslog日志功能,基于atmoz/sftp分支开发
11M+ pulls
上次更新:未知
jmcombs/sftp logo
jmcombs/sftp
atmoz/sftp的分支版本,新增SCP支持与多平台适配,提供SFTP服务。
5500K+ pulls
上次更新:未知

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

登录仓库拉取

通过 Docker 登录认证访问私有仓库

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

Docker Compose

Docker Compose 项目配置

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

MacOS OrbStack

MacOS OrbStack 容器配置

宝塔面板

在宝塔面板一键配置镜像

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

极空间

极空间 NAS 系统配置服务

爱快路由

爱快 iKuai 路由系统配置

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

专属域名拉取

无需登录使用专属域名

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

轩辕镜像免费版与专业版有什么区别?

免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。

轩辕镜像支持哪些镜像仓库?

专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。

流量耗尽错误提示

当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。

410 错误问题

通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。

manifest unknown 错误

先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。

镜像拉取成功后,如何去掉轩辕镜像域名前缀?

使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
emberstack/sftp
官方博客Docker 镜像使用技巧与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
咨询镜像拉取问题请 提交工单,官方技术交流群:1072982923
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
咨询镜像拉取问题请提交工单,官方技术交流群:
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.