-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
30 lines (25 loc) · 1.18 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Use phusion/baseimage as base image. To make your builds
# reproducible, make sure you lock down to a specific version, not
# to `latest`! See
# https://github.com/phusion/baseimage-docker/blob/master/Changelog.md
# for a list of version numbers.
FROM phusion/baseimage:0.9.19
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
RUN apt-get update && apt-get install -y vsftpd libpam-pwdfile apache2-utils
COPY etc/vsftpd.conf /etc/vsftpd.conf
COPY etc/vsftpd_user_conf/* /etc/vsftpd_user_conf/
COPY etc/pam.d/* /etc/pam.d/
COPY etc/init.d/vsftpd /etc/init.d/
RUN apt-get install -y ftp
RUN mkdir /etc/vsftpd && \
# chmod +x /etc/service/vsftpd/run && \
chmod +x /etc/init.d/vsftpd && \
htpasswd -c -p -b /etc/vsftpd/ftpd.passwd user1 $(openssl passwd -1 -noverify password) && \
htpasswd -p -b /etc/vsftpd/ftpd.passwd user2 $(openssl passwd -1 -noverify password) && \
useradd --home /home/vsftpd --gid nogroup -m --shell /bin/false vsftpd && \
mkdir -p /var/www/website_name1/sub_folder1 && \
chown vsftpd:nogroup /var/www/website_name1/sub_folder1
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
EXPOSE 21 20 30000-30009