diff --git a/DockerFile b/DockerFile new file mode 100644 index 0000000..703c0b6 --- /dev/null +++ b/DockerFile @@ -0,0 +1,41 @@ +FROM ubuntu:18.04 + +WORKDIR /usr/src/app + +COPY . . + +USER 0 + +RUN apt-get update && \ + apt-get upgrade -y && \ + apt-get install -y git + +RUN apt-get install --yes systemd curl git sudo + +# Kill all the things we don't need +RUN find /etc/systemd/system \ + /lib/systemd/system \ + -path '*.wants/*' \ + -not -name '*journald*' \ + -not -name '*systemd-tmpfiles*' \ + -not -name '*systemd-user-sessions*' \ + -exec rm \{} \; + +RUN mkdir -p /etc/sudoers.d + +RUN systemctl set-default multi-user.target + +RUN alias python=python3 + +RUN apt-get install dialog apt-utils -y + +RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata + +RUN ./server/server-setup.sh -y +COPY ./server/settings.yml ./server/settings.yml +COPY ./client/settings.yml ./client/settings.yml + +EXPOSE 80 +EXPOSE 5000 + +CMD [ "python", "server/server.py" ] \ No newline at end of file diff --git a/server/files/wipe.sh b/server/files/wipe.sh index 77f733b..d05ba3d 100644 --- a/server/files/wipe.sh +++ b/server/files/wipe.sh @@ -16,11 +16,11 @@ #dryrun=echo while read username homedir; do - $dryrun rm -rf $homedir & while read pid; do $dryrun kill -9 $pid + $dryrun shred -f $homedir & done < <(ps -o pid= -U $username) $dryrun userdel --force $username & done < <(awk -F: '$3 >= 1000 {print $1, $6}' /etc/passwd) -wait +wait \ No newline at end of file