google / grr

GRR Rapid Response: remote live forensics for incident response

Home Page:https://grr-doc.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building Custom Docker Images Tutorial Not Working

jlafiandra6 opened this issue · comments

Environment

  • How did you install GRR? [e.g. from release DEB, HEAD DEB, PIP package, source]
    Attempting to Build a Docker Image from the instructions in the docs(https://grr-doc.readthedocs.io/en/latest/installing-grr-server/via-docker.html).
  • What GRR version are you running?: [e.g. 3.1.2.3]
    3.4.5.1
  • What operating system does the GRR server run on? [e.g. Ubuntu 18.04]
    Building from a OSX.
  • What operating system does the affected GRR client run on, if applicable? [e.g. Windows 10]
    N/A

Describe the issue
Following the steps as outlined in the docs, I attempted to build my own Custom GRR Docker image. In order to verify this building tutorial works, I made no changes to the actual dockerfile. Still, when I run the last step docker build, I get an error from the last install_grr_from_gcs.sh script and no docker image is built.

Error logs

$ echo $GRR_COMMIT_SHA
8ad8a4d2c5a93c92729206b7771af19d92d4f915

$ docker build \
  -t grrdocker/grr:custom \
  --build-arg GCS_BUCKET=autobuilds.grr-response.com \
  --build-arg GRR_COMMIT=${GRR_COMMIT_SHA} \
  .

Error Log:

 => ERROR [6/6] RUN cd /usr/src/grr && bash -x /usr/src/grr/docker/instal  0.2s
------
 > [6/6] RUN cd /usr/src/grr && bash -x /usr/src/grr/docker/install_grr_from_gcs.sh:
#10 0.225 + set -ex
#10 0.225 + INITIAL_DIR=/usr/src/grr
#10 0.225 + WORK_DIR=/tmp/docker_work_dir
#10 0.225 + mkdir /tmp/docker_work_dir
#10 0.228 + cd /tmp/docker_work_dir
#10 0.228 + mv -v '/usr/src/grr/_artifacts/grr-server_*.tar.gz' .
#10 0.230 mv: cannot stat '/usr/src/grr/_artifacts/grr-server_*.tar.gz': No such file or directory
------
executor failed running [/bin/bash -c cd /usr/src/grr && bash -x /usr/src/grr/docker/install_grr_from_gcs.sh]: exit code: 1

Additional context
I've tried debugging this for a whille, but likely because I'm still very new to the GRR code structure, I'm unsure what's happening. I would guess that maybe _artifacts is supposed to be fetched from somewhere, but it's not getting fetched and it's not in this repo.

You're correct! This is a regression from our migration from Travis CI to Github Actions. Until we fix this, you can work around by downloading the latest server deb to _artifacts folder:

mkdir _artifacts
gsutil cp gs://autobuilds.grr-response.com/_latest_server_deb/*.tar.gz _artifacts/