1. docker-compose.yml
version: '3.4'
services:
vsftpd:
build: .
container_name: vsftpd
restart: always
volumes:
- ~/workspace/docker/vsftpd:/home/vsftpd
ports:
- 0.0.0.0:20:20
- 0.0.0.0:21:21
- 0.0.0.0:21100-21110:21100-21110
environment:
- TZ=Asia/Seoul
- FTP_USER=test
- FTP_PASS=test1234
- PASV_MIN_PORT=21100
- PASV_MAX_PORT=21110
- PASV_ADDRESS=127.0.0.1
2. Dockerfile
FROM fauria/vsftpd
3. startup.sh
#!/bin/bash
# 1. [ 실행권한 추가 ] 소유자 ( startup.sh )
# chmod u+x startup.sh
# 2. [ workspace 생성 ] 설정파일 폴더
mkdir -p ~/workspace/docker/vsftpd
# 3. 실행
docker compose up -d