Skip to content

Commit 43fceef

Browse files
fix: go mod tidy issue and go install in dockerfile
1 parent cf35183 commit 43fceef

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.github/workflows/core-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
4949
export GOPATH=$HOME/go
5050
export GOBIN=$GOPATH/bin
51-
export PATH=$PATH:$GOROOT:$GOBIN
51+
export PATH=$PATH:$GOPATH:$GOBIN
5252
go test -v ./... -race -coverprofile=coverage.out -coverpkg=./... -covermode=atomic
5353
cd ..
5454
- name: Upload coverage to Codecov

core/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ FROM alpine:3.18.2
2222
# Create project directory (workdir)
2323
WORKDIR /app
2424

25-
RUN apk update && apk add protoc && apk add openjdk8
26-
RUN apk update && apk add bash && apk add curl && apk add jq && apk add --update go \
25+
RUN apk update && apk add protoc && apk add openjdk8 && apk add make && apk add bash && apk add curl && apk add jq && apk add --update go \
2726
&& curl https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/bin/utils/openapi-generator-cli.sh \
2827
> /app/openapi-generator-cli \
2928
&& chmod u+x /app/openapi-generator-cli \
@@ -41,6 +40,7 @@ RUN mkdir -p /usr/share/maven /usr/share/maven/ref \
4140
&& echo "Cleaning and setting links" \
4241
&& rm -f /tmp/apache-maven.tar.gz \
4342
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
43+
4444
ENV MAVEN_HOME /usr/share/maven
4545
ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2"
4646

@@ -52,6 +52,8 @@ RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
5252
# test if the below command avoids loading the files later.
5353
RUN /app/openapi-generator-cli version
5454
RUN go version
55+
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
56+
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
5557
COPY --from=builder /app/core /
5658
COPY templates /app/templates
5759
# Application port (optional)

core/templates/compage-template-go

0 commit comments

Comments
 (0)