Skip to content

Commit

Permalink
Added ftpd image
Browse files Browse the repository at this point in the history
Simple pure-ftpd image meant for anonymous read-only downloads
  • Loading branch information
rgaudin committed Dec 18, 2024
1 parent b31f966 commit 6462872
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ftpd_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: ftpd

on:
push:
branches:
- 'main'
paths:
- 'ftpd/**'
workflow_dispatch:

jobs:

ftpd:
name: Deploy ftpd Image
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Publish Docker Image
uses: openzim/docker-publish-action@v10
with:
image-name: kiwix/ftpd
on-master: latest
restrict-to: kiwix/container-images
context: ftpd
registries: ghcr.io
credentials:
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }}
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }}
23 changes: 23 additions & 0 deletions ftpd/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM alpine:3.21
LABEL org.opencontainers.image.source=https://github.com/kiwix/container-images

RUN \
apk add --no-cache \
dumb-init \
pure-ftpd \
# must exists as it is root of data (should be mounted usually)
&& mkdir -p /var/lib/ftp \
&& printf "\
MaxClientsNumber 25\n\
Daemonize no\n\
VerboseLog yes\n\
AnonymousOnly yes\n\
AllowAnonymousFXP yes\n\
AnonymousCantUpload yes\n\
" >> /etc/pure-ftpd.conf

VOLUME /var/lib/ftp
EXPOSE 21

ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/usr/sbin/pure-ftpd"]
11 changes: 11 additions & 0 deletions ftpd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ftpd

Simple pure-ftpd image pre-configured for Anonymous downloads.

Tweak the command for runtime-specific options.

Example:

```yaml
command: ["/usr/sbin/pure-ftpd", "-4", "-p", "2000:2050", "-S", "0.0.0.0,21", "-P", "master.download.kiwix.org"]
```

0 comments on commit 6462872

Please sign in to comment.