-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
38 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,39 @@ | ||
# The basic image to run Blended containers | ||
FROM blended/base-alpine:1.0.1 | ||
FROM blended/base-alpine:3.12.1 | ||
|
||
LABEL Blended Development Team | ||
|
||
RUN apk --no-cache add \ | ||
vsftpd | ||
ENV USER_NAME=vsftp | ||
|
||
ADD files/vsftpd.conf /etc/vsftpd.conf | ||
ADD files/vsftpd.sh /opt | ||
RUN addgroup "$USER_NAME" \ | ||
&& adduser \ | ||
--uid 10101 \ | ||
--disabled-password \ | ||
--gecos "" \ | ||
--ingroup "$USER_NAME" \ | ||
"$USER_NAME" \ | ||
&& adduser $USER_NAME root | ||
|
||
RUN apk --no-cache add vsftpd | ||
|
||
RUN chown -R $USER_NAME:$GROUP /home/$USER_NAME \ | ||
&& mkdir -p /opt/vsftp \ | ||
&& chgrp -R 0 /opt/vsftp \ | ||
&& chown -R :root /opt/vsftp \ | ||
&& chmod -R g+srwX /opt/vsftp \ | ||
&& chmod g+w /etc/passwd | ||
|
||
ADD --chown=vsftp:0 files/vsftpd.conf /etc/vsftpd.conf | ||
ADD --chown=vsftp:0 files/vsftpd.sh /opt/vsftp | ||
|
||
RUN mkdir -p /var/vsftpd/uploads \ | ||
&& chown -R nobody:nogroup /var/vsftpd \ | ||
&& chmod -R 0777 /var/vsftpd/uploads \ | ||
&& chmod +x /opt/vsftpd.sh | ||
&& chmod +x /opt/vsftp/vsftpd.sh | ||
|
||
EXPOSE 20 | ||
EXPOSE 21 | ||
ENTRYPOINT [ "/usr/local/bin/uid.sh" ] | ||
|
||
CMD [ "/opt/vsftpd.sh" ] | ||
USER 10101 | ||
CMD [ "/bin/bash", "-l", "/opt/vsftp/vsftpd.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
set -x | ||
docker build -t blended/ftp-alpine:$(cat version.txt) . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#!/bin/bash | ||
|
||
touch /var/log/vsftpd.log | ||
umask 002 | ||
touch /opt/vsftp/vsftpd.log | ||
/usr/sbin/vsftpd | ||
tail -f /var/log/vsftpd.log | ||
tail -f /opt/vsftp/vsftpd.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.0.2 |