forked from google/grr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install GRR sdists from GCS when building the demo docker image, depr…
…ecate Email.link_regex config option.
- Loading branch information
Showing
13 changed files
with
216 additions
and
164 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,6 @@ | |
*_pb2.* | ||
*/*_pb2.* | ||
*/*/*_pb2.* | ||
.git | ||
.gitignore | ||
ACKNOWLEDGEMENTS | ||
AUTHORS | ||
build | ||
|
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 |
---|---|---|
@@ -1,13 +1,28 @@ | ||
# A Docker container capable of running all GRR components. | ||
# A Docker image capable of running all GRR components. | ||
# | ||
# See https://hub.docker.com/r/grrdocker/grr/ | ||
# | ||
# We have configured Travis to trigger an image build every time a new server | ||
# deb is been uploaded to GCS. | ||
# | ||
# Run the container with: | ||
# | ||
# docker run \ | ||
# -e EXTERNAL_HOSTNAME="localhost" \ | ||
# -e ADMIN_PASSWORD="demo" \ | ||
# -p 0.0.0.0:8000:8000 \ | ||
# -p 0.0.0.0:8080:8080 \ | ||
# grrdocker/grr | ||
|
||
FROM ubuntu:xenial | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
ENV GRR_VENV /usr/share/grr-server | ||
ENV PROTOC /usr/share/protobuf/bin/protoc | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
debhelper \ | ||
|
@@ -22,50 +37,28 @@ RUN apt-get update && \ | |
wget \ | ||
zip | ||
|
||
RUN pip install --upgrade pip virtualenv | ||
RUN pip install --upgrade --no-cache-dir pip virtualenv && virtualenv $GRR_VENV | ||
|
||
# Install proto compiler | ||
RUN mkdir -p /usr/share/protobuf && \ | ||
cd /usr/share/protobuf && \ | ||
wget --quiet "https://github.com/google/protobuf/releases/download/v3.3.0/protoc-3.3.0-linux-x86_64.zip" && \ | ||
unzip protoc-3.3.0-linux-x86_64.zip | ||
|
||
# Make sure Bower will be able to run as root. | ||
# Install nodeenv, a prebuilt version of NodeJS and update the virtualenv | ||
# environment. | ||
# Pull dependencies and templates from pypi and build wheels so docker can cache | ||
# them. This just makes the actual install go faster. | ||
RUN echo '{ "allow_root": true }' > /root/.bowerrc | ||
|
||
RUN virtualenv $GRR_VENV | ||
|
||
RUN $GRR_VENV/bin/pip install --upgrade wheel six setuptools nodeenv | ||
unzip protoc-3.3.0-linux-x86_64.zip && \ | ||
rm protoc-3.3.0-linux-x86_64.zip | ||
|
||
# TODO(ogaro) Stop hard-coding the node version to install | ||
# when a Linux node-sass binary compatible with node v8.0.0 is | ||
# available: https://github.com/sass/node-sass/pull/1969 | ||
RUN $GRR_VENV/bin/nodeenv -p --prebuilt --node=7.10.0 | ||
RUN $GRR_VENV/bin/pip install --upgrade --no-cache-dir wheel six setuptools nodeenv && \ | ||
$GRR_VENV/bin/nodeenv -p --prebuilt --node=7.10.0 && \ | ||
echo '{ "allow_root": true }' > /root/.bowerrc | ||
|
||
# Copy the GRR code over. | ||
ADD . /usr/src/grr | ||
|
||
WORKDIR /usr/src/grr | ||
|
||
RUN source $GRR_VENV/bin/activate && python setup.py sdist --formats=zip --dist-dir=/sdists --no-make-docs | ||
|
||
RUN $GRR_VENV/bin/python grr/config/grr-response-client/setup.py sdist --formats=zip --dist-dir=/sdists | ||
|
||
RUN $GRR_VENV/bin/python api_client/python/setup.py sdist --formats=zip --dist-dir=/sdists | ||
|
||
RUN $GRR_VENV/bin/python grr/config/grr-response-server/setup.py sdist --formats=zip --dist-dir=/sdists | ||
|
||
RUN $GRR_VENV/bin/pip install --find-links=/sdists /sdists/grr-response-server-*.zip | ||
|
||
WORKDIR / | ||
|
||
COPY scripts/docker-entrypoint.sh . | ||
RUN cd /usr/src/grr && /usr/src/grr/docker/install_grr_from_gcs.sh | ||
|
||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
ENTRYPOINT ["/usr/src/grr/scripts/docker-entrypoint.sh"] | ||
|
||
# Port for the admin UI GUI | ||
EXPOSE 8000 | ||
|
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
Oops, something went wrong.