Skip to content

Commit

Permalink
Restricting default port passive range of the sample server to avoid …
Browse files Browse the repository at this point in the history
…github actions issues.
  • Loading branch information
Florent Clairambault committed May 3, 2020
1 parent 10e6831 commit d8a1af3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
ftpserver:
image: ftpserver/ftpserver
ports:
- 2121-2200:2121-2200
- 2121-2130:2121-2130

steps:
- name: Run sample
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Should be started with:
# docker run -ti -p 2121-2200:2121-2200 ftpserver/ftpserver
FROM alpine:3.11.6
EXPOSE 2121-2200
EXPOSE 2121-2130
RUN mkdir -p /data
COPY ftpserver /bin/ftpserver
ENTRYPOINT [ "/bin/ftpserver", "-data=/data" ]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ There's also a containerized version of the demo server (15MB, based on alpine).
mkdir -p data

# Starting the sample FTP server
docker run --rm -d -p 2121-2200:2121-2200 -v $(pwd)/data:/data fclairamb/ftpserver
docker run --rm -d -p 2121-2130:2121-2130 -v $(pwd)/data:/data fclairamb/ftpserver

# Download some file
if [ ! -f kitty.jpg ]; then
Expand Down
2 changes: 1 addition & 1 deletion local-docker-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ docker build . -t test
if [ ! -f kitty.jpg ]; then
curl -o kitty.jpg.tmp https://placekitten.com/2048/2048 && mv kitty.jpg.tmp kitty.jpg
fi
docker run --name ftpserver -p 2121-2200:2121-2200 test &
docker run --name ftpserver -p 2121-2130:2121-2130 test &
while ! nc -z localhost 2121 </dev/null; do sleep 1; done
curl -v -T kitty.jpg ftp://test:test@localhost:2121/
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func main() {
// The general idea here is that if you start it without any arg, you're probably doing a local quick&dirty run
// possibly on a windows machine, so we're better of just using a default file name and create the file.
if confFile == "" {
confFile = "settings_test.toml"
confFile = "settings.toml"
autoCreate = true
}

Expand Down Expand Up @@ -124,7 +124,7 @@ public_host = "127.0.0.1"
[server.passiveTransferPortRange]
start = 2122
end = 2200
end = 2130
[[users]]
user="fclairamb"
Expand Down

0 comments on commit d8a1af3

Please sign in to comment.