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
Make use of Docker to build maya components #118
Conversation
Codecov Report
@@ Coverage Diff @@
## master #118 +/- ##
=======================================
Coverage 19.86% 19.86%
=======================================
Files 58 58
Lines 7419 7419
=======================================
Hits 1474 1474
Misses 5838 5838
Partials 107 107 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @SadPandaBear . Can you provide the logs of this Docker build as a comment in this PR.
lenteslucas@lenteslucas-H97M-D3H:~/go/src/github.com/openebs/maya$ sudo docker build -t maya-docker .
Sending build context to Docker daemon 278.3MB
Step 1/13 : FROM golang:latest
---> 99e596fc807e
Step 2/13 : ARG BUILD_DATE
---> Using cache
---> 07d38bfc85f3
Step 3/13 : LABEL org.label-schema.name "maya"
---> Using cache
---> df4cd78d5a68
Step 4/13 : LABEL org.label-schema.description "OpenEBS Storage Orchestration Engine"
---> Using cache
---> 6aa44d0238cc
Step 5/13 : LABEL org.label-schema.url "http://www.openebs.io/"
---> Using cache
---> bd19b21a71bb
Step 6/13 : LABEL org.label-schema.vcs-url "https://github.com/openebs/maya"
---> Using cache
---> 5e8d5283fecb
Step 7/13 : LABEL org.label-schema.schema-version "1.0"
---> Using cache
---> 2b0624e9d311
Step 8/13 : LABEL org.label-schema.build-date $BUILD_DATE
---> Using cache
---> 88d9e5b23911
Step 9/13 : ENV PWD /usr/local/go/src/github.com/openebs/maya
---> Using cache
---> e36cd610ca1a
Step 10/13 : RUN apt-get update && apt-get install -y zip
---> Using cache
---> 90279f485fea
Step 11/13 : WORKDIR /usr/local/go/src/github.com/openebs/maya
---> Using cache
---> 97bca71d13ca
Step 12/13 : COPY . .
---> 34d21f1d2e65
Removing intermediate container b506866ecbc0
Step 13/13 : RUN make bootstrap && make bin && make apiserver && make maya-agent && make install
---> Running in 8a9f47e2fb74
Installing github.com/golang/dep/cmd/dep
Installing golang.org/x/tools/cmd/cover
Installing github.com/axw/gocov/gocov
Installing gopkg.in/matm/v1/gocov-html
Installing github.com/ugorji/go/codec/codecgen
----------------------------
--> maya
----------------------------
==> Removing old directory...
==> Building...
386
amd64
==> Packaging...
--> linux_amd64
adding: maya (deflated 73%)
--> linux_386
adding: maya (deflated 70%)
==> Results:
total 29M
drwxr-xr-x 2 root root 4.0K Oct 17 04:07 linux_386
drwxr-xr-x 2 root root 4.0K Oct 17 04:08 linux_amd64
-rwxr-xr-x 1 root root 19M Oct 17 04:08 maya
-rw-r--r-- 1 root root 4.8M Oct 17 04:08 maya-linux_386.zip
-rw-r--r-- 1 root root 5.1M Oct 17 04:08 maya-linux_amd64.zip
----------------------------
--> maya-apiserver
----------------------------
==> Removing old bin/apiserver contents...
==> Building maya-apiserver ...
386
amd64
==> Packaging...
--> linux_amd64
adding: maya-apiserver (deflated 76%)
--> linux_386
adding: maya-apiserver (deflated 75%)
==> Results:
total 70M
drwxr-xr-x 2 root root 4.0K Oct 17 04:08 linux_386
drwxr-xr-x 2 root root 4.0K Oct 17 04:08 linux_amd64
-rwxr-xr-x 1 root root 48M Oct 17 04:08 maya-apiserver
-rw-r--r-- 1 root root 11M Oct 17 04:08 maya-apiserver-linux_386.zip
-rw-r--r-- 1 root root 12M Oct 17 04:08 maya-apiserver-linux_amd64.zip
GOOS=linux go build ./cmd/maya-agent
install -o root -g root -m 0755 ./bin/maya /usr/local/bin/maya
---> e488ec6eb0ab
Removing intermediate container 8a9f47e2fb74
Successfully built e488ec6eb0ab
Successfully tagged maya-docker:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Can you raise an issue to update the README based on this change ? The issue should detail the exact steps a developer needs to do to compile & get the respective binaries. You might want to raise a separate issue if extraction of respective binaries would be done in a separate pull.
What this PR does / why we need it: Should help openebs/openebs#625
Dockerfile building the maya, maya-apiserver and maya-agent binaries.
It still needs to get some more shape since I'm not an expert with Docker in order to support all the other rules on the Makefile.
Consider this as one step less to close the issue.