-
Notifications
You must be signed in to change notification settings - Fork 378
Generating Go Bindings with Docker #180
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
Generating Go Bindings with Docker #180
Conversation
This patch introduces the ability to generate Go language bindings using Docker with `Dockerfile-go`: # builds the container image $ docker build -t csi/spec -f Dockerfile-go . # emits the go bindings to stdout $ docker run --rm csi/spec # emits the protobuf to stdout $ docker run --rm csi/spec csi.proto
I like the idea of containerizing the build process. How do you envision this being used? Would Makefile be modified to build and run the container? |
Hi @saad-ali, This is just a short-cut for now. Ultimately, even if the Travis-CI build went to sudo mode to utilize this process, we'd still want to employ So, in other words, the first step is merging #113, then building on that with this to have the option to do a Docker build with known dependencies and required tools, such as |
Hi @saad-ali, Additionally, I'd likely publish |
However, even as an executable image, we'd still need |
FROM alpine:3.7 | ||
RUN mkdir /csi | ||
WORKDIR /csi | ||
COPY --from=0 /csi/csi.pb.go . |
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.
Just a nit, you can name each stage with FROM golang:1.9.3 AS build
and then use COPY --from=build
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.
Hi @cpuguy83,
Thanks! I've actually done that, but since this was a single stage being referenced I didn't care.
Ideally the Makefile would not require a container. |
Replaced by #181 |
This patch introduces the ability to generate Go language bindings using
Docker with
Dockerfile-go
: