Skip to content

Commit

Permalink
fix the develop container image build
Browse files Browse the repository at this point in the history
chore:	Fix the following issue while tring to build the develop container,
	(reproducible locally with: `make build`):
	```
	go: downloading gopkg.in/yaml.v3 v3.0.1
	/root/go/pkg/mod/github.com/grpc-ecosystem/grpc-gateway/v2@v2.15.0/protoc-gen-grpc-gateway/main.go:18:2: github.com/golang/glog@v1.2.1: missing go.sum entry for go.mod file; to add it:
        	go mod download github.com/golang/glog
	```

Signed-off-by: Spolti <fspolti@redhat.com>
  • Loading branch information
spolti committed Sep 10, 2024
1 parent 32c7c01 commit fad4a7f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,15 @@ RUN set -eux; \
WORKDIR /opt/app

COPY go.mod go.sum ./
# Download dependencies before copying the source so they will be cached
RUN go mod download

# Install go protoc plugins,
# no required module provides package google.golang.org/grpc/cmd/protoc-gen-go-grpc
# to add it run `go get google.golang.org/grpc/cmd/protoc-gen-go-grpc`
ENV PATH $HOME/go/bin:$PATH
RUN true \
&& go get google.golang.org/grpc/cmd/protoc-gen-go-grpc \
&& go get google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0 \
&& go install google.golang.org/grpc/cmd/protoc-gen-go-grpc \
google.golang.org/protobuf/cmd/protoc-gen-go \
github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \
Expand All @@ -97,9 +99,6 @@ RUN git init && \
git config --global --add safe.directory "*" && \
rm -rf .git

# Download dependencies before copying the source so they will be cached
RUN go mod download

# the ubi/go-toolset image doesn't define ENTRYPOINT or CMD, but we need it to run 'make develop'
CMD /bin/bash

Expand Down

0 comments on commit fad4a7f

Please sign in to comment.