GovReady / govready-q

An open source, self-service GRC tool to automate security assessments and compliance.
https://q.govready.com
Other
179 stars 55 forks source link

Failed to run developer’s environment #1729

Closed ken5scal closed 2 years ago

ken5scal commented 2 years ago

Setting up developer's environment by following https://govready-q.readthedocs.io has been failing. Specifically,

  1. git clone git@github.com:GovReady/govready-q.git
  2. cd dev_env
  3. python3 run.py init
  4. python3 run.py dev --clean
  5. Failed with the message: "[x][docker-compose -f docker-compose.yml build --parallel] Failed [code:17]- None"
  6. See an entire error
% python3 run.py dev --clean
[*]Executing command: docker-compose -f docker-compose.yml down --remove-orphans  --rmi all -v
[+] Running 2/0
 ⠿ Image docker_govready-q     Warning: No resource found to remove 0.0s
 ⠿ Image postgres:13.2-alpine  Warning: No resource found to remove 0.0s
[-]Attempting to start developer environment via docker-compose
[*]Executing command: docker-compose -f docker-compose.yml down --remove-orphans  --rmi all
[+] Running 2/0
 ⠿ Image docker_govready-q     Warning: No resource found to remove 0.0s
 ⠿ Image postgres:13.2-alpine  Warning: No resource found to remove 0.0s
[*]Checking if ports are available for deployment: [8000, 5432]
[*]Executing command: docker-compose -f docker-compose.yml build --parallel
[*]Environment Variables: {}
#1 [internal] load build definition from Dockerfile
#1 sha256:d361ccf04b03e67e9f3ad27d56226114a3c564a228c9de4c9dc4eb62b01e1b8f
#1 transferring dockerfile: 32B done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 sha256:9e6a10547a4756ecd80d58396b53d7f639c5e02394dc6e1e18452d4609ce532f
#2 transferring context: 2B done
#2 DONE 0.0s

#3 [internal] load metadata for docker.io/library/ubuntu:focal-20210119
#3 sha256:c9b7d8a25c54d7b38b62f5e0d3dd2b0210ee9fccb9146b319433655365739b3e
#3 DONE 0.9s

#4 [ 1/13] FROM docker.io/library/ubuntu:focal-20210119@sha256:703218c0465075f4425e58fac086e09e1de5c340b12976ab9eb8ad26615c3715
#4 sha256:cf039501b5d11011dc41cd00fe95e96d31e10afe8661f2cfbe4d76e9ee5a89be
#4 DONE 0.0s

#7 [ 4/13] RUN apt-get update && apt-get install -y --no-install-recommends tzdata &&   ln -fs /usr/share/zoneinfo/UTC /etc/localtime &&   dpkg-reconfigure tzdata
#7 sha256:a4c45c5c0e68cff128edb8c7e9a7126f49039660d339735ec59fb4bb878bef41
#7 CACHED

#8 [ 5/13] RUN apt-get update && apt-get -y install   unzip git curl jq   python3 python3-pip   python3-yaml   graphviz pandoc   gunicorn
#8 sha256:e4680bd401412dd649ee86e382e77f5830ca5560017ef29cbf47de1e41bb45c5
#8 CACHED

#5 [ 2/13] RUN apt-get update &&   apt-get install -y locales openssh-sftp-server openssh-server xvfb libfontconfig libmariadbclient-dev &&   echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen &&   dpkg-reconfigure locales &&   update-locale LANG=en_US.UTF-8
#5 sha256:94c7fe865e8cc9880245e162dd4a119d2065283e2fe976b3dee82db2f2dd49be
#5 CACHED

#6 [ 3/13] RUN echo "root:root" | chpasswd &&   mkdir /var/run/sshd
#6 sha256:1f50f9583efa0bcf40a75d29d01acdef851817656d7d86e3b1bbe18288dd92ff
#6 CACHED

#9 [ 6/13] RUN sed -i -- 's&deb http://deb.debian.org/debian jessie-updates main&#deb http://deb.debian.org/debian jessie-updates main&g' /etc/apt/sources.list   && apt-get update && apt-get install wget -y
#9 sha256:22f24fcb6cccc8b54f07270fe78bb79c3f83e58271b078a3f0d39dc69038913f
#9 CACHED

#10 [ 7/13] RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -   && echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list   && apt-get update && apt-get -qqy install google-chrome-stable
#10 sha256:455d137c38f68a63c89333ba520747c485ddfb151ca4f4f4c4a9f4b5faf54446
#10 0.290 Warning: apt-key output should not be parsed (stdout is not a terminal)
#10 0.511 OK
#10 0.841 Get:1 http://dl.google.com/linux/chrome/deb stable InRelease [1,811 B]
#10 0.894 Hit:2 http://ports.ubuntu.com/ubuntu-ports focal InRelease
#10 1.061 Hit:3 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
#10 1.229 Hit:4 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
#10 1.396 Hit:5 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
#10 1.461 Fetched 1,811 B in 1s (1,996 B/s)
#10 1.461 Reading package lists...
#10 2.313 E: Unable to locate package google-chrome-stable
#10 ERROR: executor failed running [/bin/sh -c wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -   && echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list   && apt-get update && apt-get -qqy install ${CHROME_VERSION:-google-chrome-stable}]: exit code: 100
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -   && echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list   && apt-get update && apt-get -qqy install ${CHROME_VERSION:-google-chrome-stable}]: exit code: 100
 > [ 7/13] RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -   && echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list   && apt-get update && apt-get -qqy install google-chrome-stable:
------
[*]Executing command: docker-compose logs
[*]Executing command: docker-compose -f docker-compose.yml down --remove-orphans  --rmi all
[+] Running 2/0
 ⠿ Image docker_govready-q     Warning: No resource found to remove 0.0s
 ⠿ Image postgres:13.2-alpine  Warning: No resource found to remove 0.0s
[x][docker-compose -f docker-compose.yml build --parallel] Failed [code:17]- None
%

Expected behavior Should have run a local server

Screenshots NA

Desktop (please complete the following information):

Client:
 Cloud integration: 1.0.17
 Version:           20.10.8
 API version:       1.41
 Go version:        go1.16.6
 Git commit:        3967b7d
 Built:             Fri Jul 30 19:55:20 2021
 OS/Arch:           darwin/arm64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.8
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.6
  Git commit:       75249d8
  Built:            Fri Jul 30 19:53:34 2021
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.4.9
  GitCommit:        e25210fe30a0a703442421b0f60afac609f950a3
 runc:
  Version:          1.0.1
  GitCommit:        v1.0.1-0-g4144b63
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Developer hints

NA

Acceptance criteria

NA

Links referenced in issue

ken5scal commented 2 years ago

N: Skipping acquire of configured file 'main/binary-arm64/Packages' as repository 'http://dl.google.com/linux/chrome/deb stable InRelease' doesn't support architecture 'arm64'

I guess this may be the problem...I will search how I can manage it in arm64...

ken5scal commented 2 years ago

It seems using Chromium Browser instead of Chrome allows running the developer environment under Mac m1.

https://github.com/GovReady/govready-q/blob/main/dev_env/docker/Dockerfile#L33

Here is the screenshot of me managed to log in via browser.

image

If it's ok, may I make a PR that replaces installation of google chrome stable to chromium browser?

gregelin commented 2 years ago

@ken5scal Yes, please make a PR!