From 62452ff553abc2ccc553e3a81d237b6f48cfed8e Mon Sep 17 00:00:00 2001 From: John Hensley Date: Wed, 17 Apr 2019 16:40:22 -0400 Subject: [PATCH] Fix Dockerfiles, create-dev-data In the Dockerfiles, running apt-install in a separate RUN after apt-update could fail if the output of the apt-update's RUN were cached; apt-install could be looking for outdated versions of packages. In create-dev-data, fix a misplaced print/format parenthesis. --- securedrop/create-dev-data.py | 4 ++-- securedrop/dockerfiles/xenial/python2/Dockerfile | 5 ++--- securedrop/dockerfiles/xenial/python3/Dockerfile | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/securedrop/create-dev-data.py b/securedrop/create-dev-data.py index 2e4d753c63..4b8555213c 100755 --- a/securedrop/create-dev-data.py +++ b/securedrop/create-dev-data.py @@ -103,8 +103,8 @@ def create_source_and_submissions(num_submissions=2, num_replies=2): db.session.commit() print("Test source (codename: '{}', journalist designation '{}') " - "added with {} submissions and {} replies").format( - codename, journalist_designation, num_submissions, num_replies) + "added with {} submissions and {} replies".format( + codename, journalist_designation, num_submissions, num_replies)) if __name__ == "__main__": # pragma: no cover diff --git a/securedrop/dockerfiles/xenial/python2/Dockerfile b/securedrop/dockerfiles/xenial/python2/Dockerfile index f17d7bab21..07d252a6ef 100644 --- a/securedrop/dockerfiles/xenial/python2/Dockerfile +++ b/securedrop/dockerfiles/xenial/python2/Dockerfile @@ -9,9 +9,8 @@ ENV USER_ID ${USER_ID:-0} RUN apt-get update && \ apt-get install -y paxctl && \ { apt-get install -y libgtk2.0 || echo 'libgtk2.0 was not installed'; } && \ - paxctl -cm /usr/bin/mono-sgen && dpkg-reconfigure mono-runtime-sgen - -RUN apt-get install -y devscripts vim \ + paxctl -cm /usr/bin/mono-sgen && dpkg-reconfigure mono-runtime-sgen && \ + apt-get install -y devscripts vim \ python-pip libpython2.7-dev libssl-dev secure-delete \ gnupg2 ruby redis-server firefox git xvfb haveged curl \ gettext paxctl x11vnc enchant libffi-dev sqlite3 gettext sudo diff --git a/securedrop/dockerfiles/xenial/python3/Dockerfile b/securedrop/dockerfiles/xenial/python3/Dockerfile index 72170c235c..051151ac5c 100644 --- a/securedrop/dockerfiles/xenial/python3/Dockerfile +++ b/securedrop/dockerfiles/xenial/python3/Dockerfile @@ -8,9 +8,8 @@ ENV USER_ID ${USER_ID:-0} # If running grsecurity kernel on the host, Memprotect must be disabled on mono-sgen in the container RUN apt-get update && apt-get install -y paxctl && \ { apt-get install -y libgtk2.0 || echo 'libgtk2.0 was not installed'; } && \ - paxctl -cm /usr/bin/mono-sgen && dpkg-reconfigure mono-runtime-sgen - -RUN apt-get install -y devscripts \ + paxctl -cm /usr/bin/mono-sgen && dpkg-reconfigure mono-runtime-sgen && \ + apt-get install -y devscripts \ python3-pip libpython3.5-dev libssl-dev secure-delete \ gnupg2 ruby redis-server firefox git xvfb haveged curl \ gettext paxctl x11vnc enchant libffi-dev sqlite3 gettext sudo \