You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
not sure, this is more of a question/clarification
Description
I'd like to specify an entrypoint for an container_image that bases off of a go_image.
In Dockerfile speak, i'd build the go binary as /server and i'd load and use that as the entrypoint like this:
FROM golang:1.19 as build
WORKDIR /go/src/app
COPY . .
RUN go mod download
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /go/bin/server
FROM gcr.io/distroless/base@sha256:75f63d4edd703030d4312dc7528a349ca34d48bec7bd754652b2d47e5a0b7873
COPY --from=build /go/bin/server /
EXPOSE 8080
CMD ["/server"]
This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days.
Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_docker!
🐞 bug report
Affected Rule
container_image
go_image
Is this a regression?
not sure, this is more of a question/clarification
Description
I'd like to specify an entrypoint for an
container_image
that bases off of ago_image
.In
Dockerfile
speak, i'd build the go binary as/server
and i'd load and use that as the entrypoint like this:with bazel, the
BUILD
i do specify the
go_binary
rule without="server"
which'll just outputbazel-bin/server
but unsure how to specify the binary to use an run in the entrypoint for the
container_image
.i do know i can workaround this by setting the following in
container_image
but this seems like a workaround for something basic i maybe missing🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_docker version:
Anything else relevant?
similar ask, i think:
#1649
The text was updated successfully, but these errors were encountered: