forked from google/grr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.client
More file actions
64 lines (53 loc) · 2.07 KB
/
Dockerfile.client
File metadata and controls
64 lines (53 loc) · 2.07 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
### A Docker image containing Fleetspeak and GRR clients.
#
# Fleetspeak client starts the GRR client as a subprocess based on the config.
#
# Fleetspeak client requires connectivity to Fleetspeak server, we
# recommend running this client in the Docker Compose stack otherwise the config
# needs to be adjusted.
#
# See documentation in compose.watch.yaml on how to start the Compose stack.
#
# (Debugging) To verify if the client runs, check if the Fleetspeak and
# GRR processes are running inside the container.
# - Open a shell in the container:
# $ docker exec -it grr-client /bin/bash
# - Check that the following processes are running:
# $ ps aux
# ...
# ... fleetspeak-client -config /configs/client/client.config
# ... /bin/bash /configs/client/grr_fleetspeak_client.sh --config /configs/client/grr.client.yaml
# ... /usr/share/grr-server/bin/python /usr/share/grr-server/bin/grr_fleetspeak_client --config /configs/client/grr.client.yaml
# ...
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Buffering output (sometimes indefinitely if a thread is stuck in
# a loop) makes for a non-optimal user experience when containers
# are run in the foreground, so we disable that.
ENV PYTHONUNBUFFERED=0
RUN apt-get update && \
apt-get install -y \
python-is-python3 \
python3-dev \
python3-pip \
python3-venv \
build-essential \
linux-headers-generic
ENV FLEETSPEAK_BIN /fleetspeak/bin
RUN mkdir -p $FLEETSPEAK_BIN
COPY --from=ghcr.io/google/fleetspeak:latest /fleetspeak/bin/client $FLEETSPEAK_BIN/fleetspeak-client
ENV PATH=${FLEETSPEAK_BIN}:${PATH}
ENV VIRTUAL_ENV=/usr/share/grr-server
ENV GRR_SOURCE=/usr/src/grr
RUN python -m venv --system-site-packages $VIRTUAL_ENV
ENV PATH=${VIRTUAL_ENV}/bin:${PATH}
RUN mkdir -p ${GRR_SOURCE}
ADD . ${GRR_SOURCE}
WORKDIR ${GRR_SOURCE}
RUN ${VIRTUAL_ENV}/bin/python -m pip install \
-e grr/proto \
-e grr/core \
-e grr/client
RUN ${VIRTUAL_ENV}/bin/python grr/proto/makefile.py && \
${VIRTUAL_ENV}/bin/python grr/core/grr_response_core/artifacts/makefile.py
ENTRYPOINT [ "fleetspeak-client" ]