File tree Expand file tree Collapse file tree 2 files changed +36
-17
lines changed
Expand file tree Collapse file tree 2 files changed +36
-17
lines changed Original file line number Diff line number Diff line change 1- FROM python:slim
2- RUN apt update && apt install -y \
3- vsftpd \
4- && rm -rf /var/lib/apt/lists/*
5-
6- RUN mkdir -p /var/run/vsftpd/empty
7-
8- COPY vsftpd.conf /etc/vsftpd.conf
9-
10- USER root
11- RUN echo 'root:password' | chpasswd
12-
13- COPY --chown=root:root ftp.py /app/ftp.py
14- RUN chmod +x /app/ftp.py
15-
16- WORKDIR /app
17-
1+ FROM python:slim
2+ RUN apt update && apt install -y \
3+ vsftpd \
4+ && rm -rf /var/lib/apt/lists/*
5+
6+ RUN mkdir -p /var/run/vsftpd/empty
7+
8+ COPY vsftpd.conf /etc/vsftpd.conf
9+
10+ USER root
11+ RUN echo 'root:password' | chpasswd
12+
13+ COPY --chown=root:root ftp.py /app/ftp.py
14+ RUN chmod +x /app/ftp.py
15+ COPY --chown=root:root publish.sh /app/publish.sh
16+ RUN chmod +x /app/publish.sh
17+
18+ ENV PATH="/app:${PATH}"
19+
20+ WORKDIR /app
21+
1822ENTRYPOINT ["sh" ,"-c" ,"/usr/sbin/vsftpd /etc/vsftpd.conf" ]
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ if (( $# < 3 || $# % 2 == 0 )) ; then
4+ echo " Usage: $0 <command> <src1> <dest1> [<src2> <dest2> ...]" >&2
5+ exit 1
6+ fi
7+
8+ command=$1
9+ shift
10+
11+ for (( i= 0 ; i< $# ; i+= 2 )) ; do
12+ src=" ${@: $i +1: 1} "
13+ dest=" ${@: $i +2: 1} "
14+ $command " $src " " $dest " || echo " $src $dest " >&2
15+ done
You can’t perform that action at this time.
0 commit comments