File: Dockerfile

package info (click to toggle)
grr 3.1.0.2+dfsg-3~bpo9+1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 46,960 kB
  • ctags: 19,666
  • sloc: python: 115,808; cpp: 7,535; sh: 1,051; xml: 288; ansic: 224; makefile: 90; asm: 13
file content (56 lines) | stat: -rw-r--r-- 1,718 bytes parent folder | download
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
# A Docker container capable of running all GRR components.
# Xenial has the correct version of the protobuf compiler (2.6.1).
FROM ubuntu:xenial
MAINTAINER Greg Castle github@mailgreg.com

RUN apt-get update && \
  apt-get install -y \
  debhelper \
  dpkg-dev \
  libssl-dev \
  prelink \
  protobuf-compiler \
  python-dev \
  python-pip \
  rpm \
  wget \
  zip && \
  pip install --upgrade pip && \
  pip install virtualenv && \
  pip install setuptools --upgrade && \
  virtualenv /usr/share/grr-server

# Pull dependencies and templates from pypi and build wheels so docker can cache
# them. This just makes the actual install go faster.
RUN . /usr/share/grr-server/bin/activate && \
mkdir /wheelhouse && \
pip wheel --wheel-dir=/wheelhouse --pre grr-response-server && \
pip wheel --wheel-dir=/wheelhouse -f https://storage.googleapis.com/releases.grr-response.com/index.html grr-response-templates

# Copy the GRR code over.
ADD . /usr/src/grr/

# Make sdists and pip install
# We require sdists so that the version.ini gets copied over properly.
RUN . /usr/share/grr-server/bin/activate && \
cd /usr/src/grr/ && \
python /usr/src/grr/setup.py sdist --dist-dir="/sdists/core" --no-make-docs --no-sync-artifacts && \
cd /usr/src/grr/grr/config/grr-response-server/ && \
python setup.py sdist --dist-dir="/sdists/server" && \
pip install --find-links=/wheelhouse /sdists/core/*.tar.gz && \
pip install --find-links=/wheelhouse /sdists/server/*.tar.gz

COPY scripts/docker-entrypoint.sh /

ENTRYPOINT ["/docker-entrypoint.sh"]

# Port for the admin UI GUI
EXPOSE 8000

# Port for clients to talk to
EXPOSE 8080

# Server config, logs, sqlite db
VOLUME ["/etc/grr", "/var/log", "/var/grr-datastore"]

CMD ["grr"]