-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (21 loc) · 792 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
FROM ubuntu:22.04
RUN apt update
RUN apt install -y openssh-server default-jre tree sqlite3
RUN useradd -rm -d /home/ftp -s /bin/bash ftp
RUN echo ftp:ftp | chpasswd
RUN service ssh start
EXPOSE 22
RUN echo "export HISTTIMEFORMAT='%d/%m/%y %T '" >> /home/ftp/.bashrc
COPY ./data /home/ftp
COPY ./scripts/prepare_database.sh /tmp
ARG flag
RUN /tmp/prepare_database.sh /home/ftp/Documents/employees/database.db "$flag"
RUN rm -rf /tmp/prepare_database.sh
COPY ./Ransomware-Java/out/artifacts/ransomware.jar /tmp
RUN java -jar /tmp/ransomware.jar /home/ftp/Documents > /tmp/encrypt.log
COPY ./scripts/prepare_history.sh /tmp
RUN /tmp/prepare_history.sh /tmp/encrypt.log
RUN rm -rf /tmp/prepare_history.sh
RUN rm -rf /tmp/encrypt.log
RUN chown ftp:ftp -R /home/ftp
CMD /usr/sbin/sshd -D