Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
74 lines (59 loc) · 2.01 KB
/
Copy pathDockerfile
File metadata and controls
74 lines (59 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# 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="grr-dev@googlegroups.com"
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 \
default-jre \
dpkg-dev \
git \
libffi-dev \
libssl-dev \
python-dev \
python-pip \
rpm \
wget \
zip
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 && \
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/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
RUN cd /usr/src/grr && /usr/src/grr/docker/install_grr_from_gcs.sh
ENTRYPOINT ["/usr/src/grr/scripts/docker-entrypoint.sh"]
# Port for the admin UI GUI
EXPOSE 8000
# Port for clients to talk to
EXPOSE 8080
# Directories used by GRR at runtime, which can be mounted from the host's
# filesystem. Note that volumes can be mounted even if they do not appear in
# this list.
VOLUME ["/usr/share/grr-server/install_data/etc", "/usr/share/grr-server/lib/python2.7/site-packages/grr/var/grr-datastore"]
CMD ["grr"]