Compare commits
64 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2972d47b3a | ||
![]() |
081cd984a5 | ||
![]() |
0143484a9a | ||
![]() |
5e2d5a7beb | ||
![]() |
141e06e2cd | ||
![]() |
de78cf9252 | ||
![]() |
667e747eb3 | ||
![]() |
b10fed738b | ||
![]() |
79658d5d77 | ||
![]() |
9613032974 | ||
![]() |
a2c9b8a526 | ||
![]() |
560b73e4c9 | ||
![]() |
7e39cb53a8 | ||
![]() |
62a330b306 | ||
![]() |
76e050b39a | ||
![]() |
f8ed77d02f | ||
![]() |
75c005acd8 | ||
![]() |
250dd569d5 | ||
![]() |
066d7de4f5 | ||
![]() |
561048c733 | ||
![]() |
cdfc224a6a | ||
![]() |
ed812ba47e | ||
![]() |
2eb9bb0aea | ||
![]() |
1e44bb641d | ||
![]() |
1664796bc6 | ||
![]() |
257f191551 | ||
![]() |
3eae7bde83 | ||
![]() |
e206e47c17 | ||
![]() |
06162a4625 | ||
![]() |
c9a39f7b98 | ||
![]() |
3211fdc323 | ||
![]() |
711e65ccc8 | ||
![]() |
72cceeacb7 | ||
![]() |
38f730875e | ||
![]() |
96f729e334 | ||
![]() |
a45f7de658 | ||
![]() |
39ea12d722 | ||
![]() |
3bed95db5a | ||
![]() |
04095af51c | ||
![]() |
e55ca51ef3 | ||
![]() |
ae9debad97 | ||
![]() |
80545b3ace | ||
![]() |
f7ea9ae881 | ||
![]() |
fdd8a45eb1 | ||
![]() |
53fc3886d8 | ||
![]() |
e17388b072 | ||
![]() |
17fad30c4c | ||
![]() |
d0c2826796 | ||
![]() |
79111eb3cf | ||
![]() |
1b1931ff4d | ||
![]() |
c93a484e86 | ||
![]() |
5b26f6425a | ||
![]() |
ae94c71a53 | ||
![]() |
27f5b5361d | ||
![]() |
a67dccdcd1 | ||
![]() |
658ece9e03 | ||
![]() |
7e1a53a950 | ||
![]() |
ce54f573eb | ||
![]() |
9c4e9a03f0 | ||
![]() |
c8ead95d4a | ||
![]() |
cd4a51ee5f | ||
![]() |
60d0e1fe28 | ||
![]() |
fc837e7c0a | ||
![]() |
3315a73ca5 |
9 changed files with 101 additions and 23 deletions
13
.editorconfig
Normal file
13
.editorconfig
Normal file
|
@ -0,0 +1,13 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = tab
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.yml]
|
||||
indent_size = 2
|
||||
indent_style = space
|
11
.github/dependabot.yml
vendored
11
.github/dependabot.yml
vendored
|
@ -2,5 +2,16 @@ version: 2
|
|||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
reviewers:
|
||||
- "garethflowers"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
- package-ecosystem: "docker"
|
||||
commit-message:
|
||||
include: "scope"
|
||||
prefix: "chore"
|
||||
directory: "/"
|
||||
reviewers:
|
||||
- "garethflowers"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
|
34
.github/workflows/publish.yml
vendored
34
.github/workflows/publish.yml
vendored
|
@ -1,18 +1,23 @@
|
|||
name: Publish
|
||||
name: Build and Publish Images
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
push:
|
||||
branches: main
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- "*.*.*"
|
||||
jobs:
|
||||
main:
|
||||
publish:
|
||||
name: Publish
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
- name: Prepare
|
||||
id: prep
|
||||
uses: crazy-max/ghaction-docker-meta@v2
|
||||
uses: docker/metadata-action@v5.0.0
|
||||
with:
|
||||
images: |
|
||||
${{ github.repository_owner }}/ftp-server
|
||||
|
@ -23,32 +28,35 @@ jobs:
|
|||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@v1
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and Push
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
|
||||
push: true
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.prep.outputs.tags }}
|
||||
labels: ${{ steps.prep.outputs.labels }}
|
||||
- name: Update Description
|
||||
continue-on-error: true
|
||||
uses: peter-evans/dockerhub-description@v2
|
||||
uses: peter-evans/dockerhub-description@v3
|
||||
with:
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
repository: ${{ github.repository_owner }}/ftp-server
|
||||
short-description: ${{ github.event.repository.description }}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
FROM alpine:3.13.4
|
||||
|
||||
FROM alpine:3.18.4
|
||||
ENV FTP_USER=foo \
|
||||
FTP_PASS=bar \
|
||||
GID=1000 \
|
||||
UID=1000
|
||||
|
||||
RUN apk add --no-cache --update \
|
||||
vsftpd==3.0.3-r6
|
||||
vsftpd==3.0.5-r2
|
||||
|
||||
COPY [ "/src/vsftpd.conf", "/etc" ]
|
||||
COPY [ "/src/docker-entrypoint.sh", "/" ]
|
||||
|
||||
CMD [ "/usr/sbin/vsftpd" ]
|
||||
ENTRYPOINT [ "/docker-entrypoint.sh" ]
|
||||
EXPOSE 20/tcp 21/tcp 40000-40009/tcp
|
||||
HEALTHCHECK CMD netstat -lnt | grep :21 || exit 1
|
||||
|
|
19
README.md
19
README.md
|
@ -5,7 +5,7 @@ A simple FTP server, using
|
|||
|
||||
## How to use this image
|
||||
|
||||
### Start a FTP Server instance
|
||||
### start a FTP Server instance
|
||||
|
||||
To start a container, with data stored in `/data` on the host, use the
|
||||
following:
|
||||
|
@ -22,6 +22,23 @@ docker run \
|
|||
garethflowers/ftp-server
|
||||
```
|
||||
|
||||
### ... via `docker compose`
|
||||
|
||||
```yml
|
||||
services:
|
||||
ftp-server:
|
||||
container_name: my-ftp-server
|
||||
environment:
|
||||
- FTP_PASS=123
|
||||
- FTP_USER=user
|
||||
image: garethflowers/ftp-server
|
||||
ports:
|
||||
- '20-21:20-21/tcp'
|
||||
- '40000-40009:40000-40009/tcp'
|
||||
volumes:
|
||||
- '/data:/home/user'
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
- This image is released under the
|
||||
|
|
10
_config.yml
Normal file
10
_config.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
docker_repository: garethflowers/ftp-server
|
||||
author: garethflowers
|
||||
plugins:
|
||||
- jekyll-remote-theme
|
||||
- jekyll-sitemap
|
||||
remote_theme: garethflowers/garethflowers.github.io
|
||||
tagline: Gareth Flowers
|
||||
twitter:
|
||||
username: garethflowers
|
||||
card: summary
|
|
@ -17,4 +17,9 @@ mkdir -p /home/$FTP_USER
|
|||
chown -R $FTP_USER:$FTP_USER /home/$FTP_USER
|
||||
echo "$FTP_USER:$FTP_PASS" | /usr/sbin/chpasswd
|
||||
|
||||
exec "$@"
|
||||
touch /var/log/vsftpd.log
|
||||
tail -f /var/log/vsftpd.log | tee /dev/stdout &
|
||||
touch /var/log/xferlog
|
||||
tail -f /var/log/xferlog | tee /dev/stdout &
|
||||
|
||||
/usr/sbin/vsftpd
|
||||
|
|
|
@ -6,8 +6,8 @@ session_support=NO
|
|||
|
||||
# access
|
||||
anonymous_enable=NO
|
||||
local_enable=YES
|
||||
ftpd_banner=FTP Server
|
||||
local_enable=YES
|
||||
|
||||
# local user
|
||||
allow_writeable_chroot=YES
|
||||
|
@ -17,22 +17,30 @@ local_umask=022
|
|||
passwd_chroot_enable=YES
|
||||
|
||||
# directory
|
||||
dirlist_enable=YES
|
||||
dirmessage_enable=NO
|
||||
hide_ids=YES
|
||||
|
||||
# file transfer
|
||||
write_enable=YES
|
||||
|
||||
# logging
|
||||
dual_log_enable=YES
|
||||
log_ftp_protocol=YES
|
||||
xferlog_enable=YES
|
||||
|
||||
# network
|
||||
connect_from_port_20=NO
|
||||
ftp_data_port=20
|
||||
max_clients=0
|
||||
max_per_ip=0
|
||||
pasv_enable=YES
|
||||
pasv_address=0.0.0.0
|
||||
pasv_addr_resolve=YES
|
||||
pasv_promiscuous=YES
|
||||
pasv_enable=YES
|
||||
pasv_max_port=40009
|
||||
pasv_min_port=40000
|
||||
port_enable=YES
|
||||
ftp_data_port=20
|
||||
connect_from_port_20=YES
|
||||
|
||||
# tweaks
|
||||
seccomp_sandbox=NO
|
||||
|
|
8
test.sh
Executable file
8
test.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
set -xe
|
||||
export IMAGE_NAME=garethflowers/ftp-server
|
||||
|
||||
docker build --tag $IMAGE_NAME .
|
||||
docker run --rm $IMAGE_NAME sh -c 'vsftpd -version 0>&1'
|
||||
|
||||
echo "\nOK"
|
Loading…
Add table
Reference in a new issue