cloud-inquisitor icon indicating copy to clipboard operation
cloud-inquisitor copied to clipboard

Local Development in Docker

Open Ph4rell opened this issue 5 years ago • 4 comments

Summary

Issue when following the Local Development in Docker installation. Summary. i've followed the local dev in Docker section to setup Cinq, but i always got the same error, guys do you know this issue and what i did wrong ? If you want some help to improve your docs i can help btw ! Regards, Pierre

docker-compose build                                                                                                   dev ?  ✔  4481
WARNING: The AWS_SESSION_TOKEN variable is not set. Defaulting to a blank string.
db uses an image, skipping
api uses an image, skipping
scheduler uses an image, skipping
Building frontend
Step 1/3 : FROM node:8.9
 ---> 672002a50a0b
Step 2/3 : RUN cd /tmp     && mkdir -p /frontend/dist     && curl -L http://releases.cloud-inquisitor.io/cinq-frontend-latest.tar.gz > frontend.tar.gz     && tar -xvf frontend.tar.gz -C /frontend/dist     && cd /     && npm install -g serve
 ---> Using cache
 ---> da60bb7d00d1
Step 3/3 : CMD cd /frontend     && if [ -r package.json ]; then npm i; npm rebuild node-sass; ./node_modules/gulp/bin/gulp.js dev & fi     && serve -p 3000 -s /frontend/dist
 ---> Using cache
 ---> 1562720d3df2
Successfully built 1562720d3df2
Successfully tagged cinq_frontend:latest
Building base
Step 1/8 : FROM ubuntu:latest as builder
 ---> 47b19964fb50
Step 2/8 : RUN apt-get update && DEBIAN_FRONTEND=noninteractive     apt-get install -y openssl
 ---> Using cache
 ---> 6b0b62ba1adf
Step 3/8 : RUN mkdir /cert     && openssl req -x509 -subj "/C=US/ST=CA/O=Your Company/localityName=Your City/commonName=localhost/organizationalUnitName=Operations/[email protected]"        -days 3650 -newkey rsa:2048 -nodes -keyout /cert/cinq-frontend.key -out /cert/cinq-frontend.crt     && openssl genrsa -out /cert/private.key 2048     && mkdir /logfiles     && touch /logfiles/apiserver.log /logfiles/default.log /logfiles/scheduler.log
 ---> Using cache
 ---> f8e63ee5aa89
Step 4/8 : FROM python:3.5
 ---> 3c1892f11483
Step 5/8 : COPY --from=builder /cert/* /usr/local/etc/cloud-inquisitor/ssl/
 ---> Using cache
 ---> 37efb7ed5683
Step 6/8 : COPY --from=builder /logfiles/* /var/log/cloud-inquisitor/
 ---> Using cache
 ---> 179d6e87e03c
Step 7/8 : COPY ./ /cloud-inquisitor
 ---> bea2b0669873
Step 8/8 : RUN apt-get update     && cd /cloud-inquisitor/backend     && DEBIAN_FRONTEND=noninteractive apt-get install -y libxmlsec1-dev     && pip3 install virtualenv     && python3 -m virtualenv /env     && . /env/bin/activate     && python setup.py install
 ---> Running in cee711fa5d4a
Ign:1 http://deb.debian.org/debian stretch InRelease
Get:2 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Get:3 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:4 http://deb.debian.org/debian stretch Release [118 kB]
Get:5 http://deb.debian.org/debian stretch Release.gpg [2434 B]
Get:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [476 kB]
Get:7 http://deb.debian.org/debian stretch-updates/main amd64 Packages [11.1 kB]
Get:8 http://deb.debian.org/debian stretch/main amd64 Packages [7084 kB]
Fetched 7876 kB in 3s (2138 kB/s)
Reading package lists...
/bin/sh: 1: cd: can't cd to /cloud-inquisitor/backend
ERROR: Service 'base' failed to build: The command '/bin/sh -c apt-get update     && cd /cloud-inquisitor/backend     && DEBIAN_FRONTEND=noninteractive apt-get install -y libxmlsec1-dev     && pip3 install virtualenv     && python3 -m virtualenv /env     && . /env/bin/activate     && python setup.py install' returned a non-zero code: 2

Ph4rell avatar Mar 11 '19 14:03 Ph4rell

@HTTP500 : Thoughts on this?

TheM0ng00se avatar Mar 13 '19 23:03 TheM0ng00se

Hello, When i docker build the base-Dockerfile from /cloud-inquisitor/resources/docker i got the problem.

If i use the docker build -f ./resources/docker/base-Dockerfile from /cloud-inquisitor its works ! Still got the same error if i do a docker-compose -f ./resources/docker/docker-compose.yml build from repertory /cloud-inquisitor.

Hope it will help you to understand the problem. regards,

Ph4rell avatar Mar 20 '19 15:03 Ph4rell

@Ph4rell : Would you be interested in submitting a PR to resolve this?

TheM0ng00se avatar Mar 20 '19 15:03 TheM0ng00se

@TheM0ng00se , i'll try to work on it, not sure i'll find the solution :)

Ph4rell avatar Mar 22 '19 18:03 Ph4rell