forked from chriskite/pure-ftpd-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (29 loc) · 1006 Bytes
/
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
31
32
33
34
35
36
37
38
39
FROM registry.ofr.cloud/devops/baseimage:1.1.3
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update
RUN apt-get -y --force-yes install dpkg-dev debhelper
# install dependancies
RUN apt-get -y build-dep pure-ftpd
# build from source
RUN mkdir /tmp/pure-ftpd/ && \
cd /tmp/pure-ftpd/ && \
apt-get source pure-ftpd && \
cd pure-ftpd-* && \
sed -i '/^optflags=/ s/$/ --without-capabilities/g' ./debian/rules && \
dpkg-buildpackage -b -uc
# install the new deb files
RUN dpkg -i /tmp/pure-ftpd/pure-ftpd-common*.deb
RUN apt-get -y install openbsd-inetd
RUN dpkg -i /tmp/pure-ftpd/pure-ftpd_*.deb
# Prevent pure-ftpd upgrading
RUN apt-mark hold pure-ftpd pure-ftpd-common
# Runit for pure-ftpd
RUN mkdir /etc/service/pure-ftpd
ADD pure-ftpd.sh /etc/service/pure-ftpd/run
# Setup ftp user and group, and virtual users
ADD setup-ftp.sh /tmp/
ADD virtual-users /tmp/
RUN /tmp/setup-ftp.sh
# Clean up APT when done.
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
EXPOSE 21/tcp