Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update wipe and add DockerFile #33

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions DockerFile
Original file line number Diff line number Diff line change
@@ -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" ]
4 changes: 2 additions & 2 deletions server/files/wipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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