-
Notifications
You must be signed in to change notification settings - Fork 685
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev: Add make test-xenial makefile target for application tests
As evidenced by the test failures we've discovered, we'll need to make some changes that ideally work under both Trusty and Xenial. This means that we need to run the application tests in both environments. This PR adds a $BASE_OS env var that can be either "trusty" or "xenial". It uses this env var for docker builds, and modifies the docker build logic to point to a Dockerfile outside of the build context [1]. We make a new directory in the securedrop/ directory called Dockerfiles that contains the Dockerfiles for both environments. By default, the other Makefile targets will use Trusty. Once trusty is EOL, we can delete the Trusty Dockerfile, though it would be prudent to leave the BASE_OS logic in place for the next major OS transition. [1] docker/cli#886
- Loading branch information
1 parent
0fc6bf2
commit 44daf59
Showing
4 changed files
with
70 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# ubuntu:14.04 as of 2018-06-19 | ||
FROM ubuntu@sha256:885bb6705b01d99544ddb98cbe4e4555d1efe1d052cef90832e72a0688ac6b37 | ||
ARG USER_NAME | ||
ENV USER_NAME ${USER_NAME:-root} | ||
ARG USER_ID | ||
ENV USER_ID ${USER_ID:-0} | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y devscripts \ | ||
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 | ||
|
||
RUN gem install sass -v 3.4.23 | ||
|
||
ENV FIREFOX_CHECKSUM=88d25053306d33658580973b063cd459a56e3596a3a298c1fb8ab1d52171d860 | ||
RUN curl -LO https://launchpad.net/~ubuntu-mozilla-security/+archive/ubuntu/ppa/+build/9727836/+files/firefox_46.0.1+build1-0ubuntu0.14.04.3_amd64.deb && \ | ||
shasum -a 256 firefox*deb && \ | ||
echo "${FIREFOX_CHECKSUM} firefox_46.0.1+build1-0ubuntu0.14.04.3_amd64.deb" | shasum -a 256 -c - && \ | ||
dpkg -i firefox*deb && apt-get install -f && \ | ||
paxctl -cm /usr/lib/firefox/firefox | ||
|
||
# | ||
# This can be removed when upgrading to something more recent than trusty | ||
# | ||
RUN echo deb http://archive.ubuntu.com/ubuntu/ xenial main > /etc/apt/sources.list.d/xenial.list && \ | ||
apt-get update && \ | ||
apt-get install -y gettext && \ | ||
rm /etc/apt/sources.list.d/xenial.list && \ | ||
apt-get update | ||
|
||
COPY requirements requirements | ||
RUN pip install -r requirements/securedrop-app-code-requirements.txt && \ | ||
pip install -r requirements/test-requirements.txt | ||
|
||
RUN if test $USER_NAME != root ; then useradd --no-create-home --home-dir /tmp --uid $USER_ID $USER_NAME && echo "$USER_NAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers ; fi | ||
|
||
STOPSIGNAL SIGKILL | ||
|
||
EXPOSE 8080 8081 5901 |
File renamed without changes.