Compare commits
No commits in common. "main" and "0.2.0" have entirely different histories.
9 changed files with 23 additions and 101 deletions
|
@ -1,13 +0,0 @@
|
|||
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,16 +2,5 @@ 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,23 +1,18 @@
|
|||
name: Build and Publish Images
|
||||
name: Publish
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
branches: main
|
||||
tags:
|
||||
- "*.*.*"
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v2
|
||||
- name: Prepare
|
||||
id: prep
|
||||
uses: docker/metadata-action@v5.0.0
|
||||
uses: crazy-max/ghaction-docker-meta@v2
|
||||
with:
|
||||
images: |
|
||||
${{ github.repository_owner }}/ftp-server
|
||||
|
@ -28,35 +23,32 @@ jobs:
|
|||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Login to DockerHub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Login to GHCR
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build and Push
|
||||
uses: docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
push: true
|
||||
tags: ${{ steps.prep.outputs.tags }}
|
||||
labels: ${{ steps.prep.outputs.labels }}
|
||||
- name: Update Description
|
||||
continue-on-error: true
|
||||
uses: peter-evans/dockerhub-description@v3
|
||||
uses: peter-evans/dockerhub-description@v2
|
||||
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,15 +1,17 @@
|
|||
FROM alpine:3.18.4
|
||||
FROM alpine:3.13.4
|
||||
|
||||
ENV FTP_USER=foo \
|
||||
FTP_PASS=bar \
|
||||
GID=1000 \
|
||||
UID=1000
|
||||
|
||||
RUN apk add --no-cache --update \
|
||||
vsftpd==3.0.5-r2
|
||||
vsftpd==3.0.3-r6
|
||||
|
||||
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,23 +22,6 @@ 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
10
_config.yml
|
@ -1,10 +0,0 @@
|
|||
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,9 +17,4 @@ mkdir -p /home/$FTP_USER
|
|||
chown -R $FTP_USER:$FTP_USER /home/$FTP_USER
|
||||
echo "$FTP_USER:$FTP_PASS" | /usr/sbin/chpasswd
|
||||
|
||||
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
|
||||
exec "$@"
|
||||
|
|
|
@ -6,8 +6,8 @@ session_support=NO
|
|||
|
||||
# access
|
||||
anonymous_enable=NO
|
||||
ftpd_banner=FTP Server
|
||||
local_enable=YES
|
||||
ftpd_banner=FTP Server
|
||||
|
||||
# local user
|
||||
allow_writeable_chroot=YES
|
||||
|
@ -17,30 +17,22 @@ 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_address=0.0.0.0
|
||||
pasv_addr_resolve=YES
|
||||
pasv_promiscuous=YES
|
||||
pasv_enable=YES
|
||||
pasv_address=0.0.0.0
|
||||
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
8
test.sh
|
@ -1,8 +0,0 @@
|
|||
#!/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