Skip to content

Commit

Permalink
Readme: Fixing it (#646)
Browse files Browse the repository at this point in the history
* Readme: Fixing the documentation
* Updating docker-compose
  • Loading branch information
fclairamb authored Apr 27, 2022
1 parent 71fa107 commit e1a8108
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
26 changes: 10 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ These features are brought by [ftpserverlib](https://github.com/fclairamb/ftpser
* [AUTH](https://tools.ietf.org/html/rfc2228#page-6) - Control session protection
* [AUTH TLS](https://tools.ietf.org/html/rfc4217#section-4.1) - TLS session
* [PROT](https://tools.ietf.org/html/rfc2228#page-8) - Transfer protection
* [EPRT/EPSV](https://tools.ietf.org/html/rfc2428) - IPv6 support
* [MDTM](https://tools.ietf.org/html/rfc3659#page-8) - File Modification Time
* [SIZE](https://tools.ietf.org/html/rfc3659#page-11) - Size of a file
* [REST](https://tools.ietf.org/html/rfc3659#page-13) - Restart of interrupted transfer
Expand All @@ -58,30 +59,23 @@ These features are brought by [ftpserverlib](https://github.com/fclairamb/ftpser
#### Download it
Fetch a binary from the [latest release](/releases) and run it.

#### Build it
#### Build & run it locally

```bash
go install github.com/fclairamb/ftpserver@main

ftpserver &
```

#### Run it with docker
There's also a containerized version of the server (31MB, based on alpine).

```sh
# Starting the sample FTP server
docker run --rm -d -p 2121-2130:2121-2130 -v ./ftpserver/files:/tmp -v ./ftpserver:/app fclairamb/ftpserver

# Download some file
[ -f kitty.jpg ] || (curl -o kitty.jpg.tmp https://placekitten.com/2048/2048 && mv kitty.jpg.tmp kitty.jpg)

# Upload it
curl -v -T kitty.jpg ftp://test:test@localhost:2121/
# Creating a directory
mkdir -p files

# Download it back
curl ftp://test:test@localhost:2121/kitty.jpg -o kitty2.jpg

# Compare it
diff kitty.jpg kitty2.jpg
# Starting the sample FTP server
docker run --rm -d -p 2121-2130:2121-2130 -v $(pwd)/files:/tmp -v $(pwd):/app fclairamb/ftpserver
```

#### Run it with docker compose
Expand All @@ -94,8 +88,8 @@ services:
ports:
- '2121-2130:2121-2130'
volumes:
- ./ftpserver/files:/tmp
- ./ftpserver:/app
- ./files:/tmp
- .:/app
image: fclairamb/ftpserver
```
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
ports:
- '2121-2130:2121-2130'
volumes:
- ./ftpserver/files:/tmp
- ./ftpserver:/app
- ./files:/tmp
- .:/app
image: fclairamb/ftpserver

0 comments on commit e1a8108

Please sign in to comment.