Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build junoDB using docker #140

Open
viralnatani opened this issue Jun 6, 2023 · 4 comments
Open

Unable to build junoDB using docker #140

viralnatani opened this issue Jun 6, 2023 · 4 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@viralnatani
Copy link

viralnatani commented Jun 6, 2023

I was following the steps mentioned in the README.md file to build junoDB using docker. But the build.sh threw an error:

Screenshot 2023-06-05 at 5 52 06 PM

This error originates from Makefile located at path ~/docker/Makefile at line number 58 while creating a build for junoclustercfg.

Upon further investigation, it looks like some dependency folder is missing.

  1. Build command uses dockerfile located at ~/docker/cluster-service-build/Dockerfile.
image
  1. For building a docker image for junoclustercfg it copies files from /juno/bin folder from juno-build. As shown below
image

But when juno-build is investigated it turns out there is no folder bin located at /juno

  1. This can be traced back to Dockerfile (located at ~/docker/build/Docker)used to build juno-build . It copies /src/juno to /juno folder. So /src/juno must contains bin folder. But it isn't there.
image
@NeetishPathak
Copy link
Collaborator

juno docker build is a multi-stage build.
juno-dev and juno-build image must be created before other images like junoserv,junostoragserv,junoclustercfg,junoclusterserv etc

from the junodb home folder , follow the steps

  • docker login (authentication with dockerhub)
  • docker/build.sh

This will generate juno-build image that will be used to copy juno binaries.
/juno/bin directory is where binaries are located , it is configured in the golang install command https://github.com/paypal/junodb/blob/dev/docker/build/build.sh#L50

This is followed by building individual images for junodb services
you should have the following images created eventually
REPOSITORY TAG
ghcr.io/paypal/junodb/junoclient:latest
ghcr.io/paypal/junodb/junostorageserv:latest
ghcr.io/paypal/junodb/junoserv:latest
ghcr.io/paypal/junodb/junoclustercfg:latest
ghcr.io/paypal/junodb/junoclusterserv:latest
ghcr.io/paypal/junodb/juno-build:latest
ghcr.io/paypal/junodb/juno-dev:latest

It is likely that juno-build image is not successfully built in this case
You may see a demo here - https://github.com/paypal/junodb/blob/dev/docs/videos.md

Can you mention the environment you are using. docker version, os etc. I am not able to reproduce this issue

@viralnatani
Copy link
Author

I am using macOS and the docker version is 20.10.11.

@MichelBoucey
Copy link

FYI build process is flawless on an up-to-date ArchLinux running docker version 24.0.2.

@NeetishPathak
Copy link
Collaborator

NeetishPathak commented Jun 14, 2023

If the juno-build image is not correctly built , it will not have the required binaries such as /opt/juno/junoctl etc.

When building macOs with docker desktop , I saw the issue when corporate firewall MITMing your https connections and some go modules certs could not be verified. As a result, juno-build step was not successful and you'll need an appropriate CA . The similar issue was reported on golang project golang/go#46428 , golang/go#45569

I have added the juno-build image script to exit during juno-build if certs verification fail. You can try to re-build and confirm if that was the issue.

Otherwise, building on macOS on github actions workflow is working fine.
https://github.com/paypal/junodb/actions/runs/5259960159/jobs/9513643692

@varuntechie varuntechie added bug Something isn't working documentation Improvements or additions to documentation labels Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants