mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-25 17:10:28 +00:00
parent
02e35ee002
commit
56b00addc4
4 changed files with 18 additions and 6 deletions
|
@ -1,5 +1,17 @@
|
|||
# Dockerfile examples
|
||||
|
||||
Sample Dockerfiles for `sftpgo` daemon and the REST API CLI.
|
||||
Sample Dockerfiles for the SFTPGo daemon and the REST API CLI.
|
||||
|
||||
We don't want to add a `Dockerfile` for each single `sftpgo` configuration options or data provider. You can use the docker configurations here as starting point that you can customize to run `sftpgo` with [Docker](http://www.docker.io "Docker").
|
||||
The SFTPGo Dockerfiles for `Debian` and `Alpine` are multi-stage builds, you can customize your build configuration using the pre-defined build arguments. For example the following build argument is defined for both `Debian` and `Alpine`:
|
||||
|
||||
```console
|
||||
ARG TAG
|
||||
```
|
||||
|
||||
you can build a specific tag/commit passing, for example, `--build-arg TAG=v1.0.0` to the `docker build` command, please take a look at the specific `Dockerfile` to see all the available build args.
|
||||
|
||||
The runtime configuration can be customized via environment variables that you can set directly inside the `Dockerfile` (not recommended) or passing the `-e` option to the `docker run` command or inside the `environment` section if you are using [docker stack deploy](https://docs.docker.com/engine/reference/commandline/stack_deploy/) or [docker-compose](https://github.com/docker/compose).
|
||||
|
||||
Please take a look [here](../docs/full-configuration.md#environment-variables) to learn how to configure SFTPGo via environment variables.
|
||||
|
||||
I'm not a `Docker` expert, you can use the provided Dockerfiles as starting point, if you think they can improved to be more general or you want to improve the documentation please send pull requests, thank you!
|
||||
|
|
|
@ -183,4 +183,4 @@ Let's see some examples:
|
|||
- To set sftpd `bind_port`, you need to define the env var `SFTPGO_SFTPD__BIND_PORT`
|
||||
- To set the `execute_on` actions, you need to define the env var `SFTPGO_COMMON__ACTIONS__EXECUTE_ON`. For example `SFTPGO_COMMON__ACTIONS__EXECUTE_ON=upload,download`
|
||||
|
||||
Please note that, to override configuration options with environment variables, a configuration file containing the options to override is required. You can, for example, deploy the default configuration file and then override the options you need to customize using environment variables.
|
||||
Please note that, to override configuration options with environment variables, a configuration file containing the options to override is required, this is a [viper bug](https://github.com/spf13/viper/issues/584). You can, for example, deploy the default configuration file and then override the options you need to customize using environment variables.
|
||||
|
|
2
go.mod
2
go.mod
|
@ -51,7 +51,7 @@ require (
|
|||
replace (
|
||||
github.com/fclairamb/ftpserverlib => github.com/drakkan/ftpserverlib v0.0.0-20200814103339-511fcfd63dfe
|
||||
github.com/jlaffaye/ftp => github.com/drakkan/ftp v0.0.0-20200730125632-b21eac28818c
|
||||
github.com/pkg/sftp => github.com/drakkan/sftp v0.0.0-20200822075112-b48593166377
|
||||
github.com/pkg/sftp => github.com/drakkan/sftp v0.0.0-20200824132209-4da3253ee1d6
|
||||
golang.org/x/crypto => github.com/drakkan/crypto v0.0.0-20200731130417-7674a892f9b1
|
||||
golang.org/x/net => github.com/drakkan/net v0.0.0-20200807161257-daa5cda5ae27
|
||||
)
|
||||
|
|
4
go.sum
4
go.sum
|
@ -111,8 +111,8 @@ github.com/drakkan/ftpserverlib v0.0.0-20200814103339-511fcfd63dfe h1:yiliFcCxu5
|
|||
github.com/drakkan/ftpserverlib v0.0.0-20200814103339-511fcfd63dfe/go.mod h1:ShLpSOXbtoMDYxTb5eRs9wDBfkQ7VINYghclB4P2z4E=
|
||||
github.com/drakkan/net v0.0.0-20200807161257-daa5cda5ae27 h1:hh14GxmE3PMKL+4nvMmX7O8CUtbD/52IKDjbMTYX7IY=
|
||||
github.com/drakkan/net v0.0.0-20200807161257-daa5cda5ae27/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
|
||||
github.com/drakkan/sftp v0.0.0-20200822075112-b48593166377 h1:Zq2sezrJ0QwCVUpjOjMPZMHx3foI5pciGsNfCj8pHm4=
|
||||
github.com/drakkan/sftp v0.0.0-20200822075112-b48593166377/go.mod h1:i24A96cQ6ZvWut9G/Uv3LvC4u3VebGsBR5JFvPyChLc=
|
||||
github.com/drakkan/sftp v0.0.0-20200824132209-4da3253ee1d6 h1:2odjq46RgD0/qTzAiX6Rxxq+7jAzu6gGoHBHcgIS0og=
|
||||
github.com/drakkan/sftp v0.0.0-20200824132209-4da3253ee1d6/go.mod h1:i24A96cQ6ZvWut9G/Uv3LvC4u3VebGsBR5JFvPyChLc=
|
||||
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
|
||||
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
|
||||
|
|
Loading…
Reference in a new issue