master
icechen 2021-12-28 11:55:55 +08:00
parent 555069ddfe
commit cae415ccd8
2 changed files with 3 additions and 4 deletions

View File

@ -1,4 +1,3 @@
kind: template
load: plugin.jsonnet
namespace: zeus
name: golang_ci1.jsonnet

View File

@ -8,7 +8,7 @@ RUN go mod download
WORKDIR /go/src
ADD . .
RUN go mod tidy
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o api_example_api
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o api_example_api ./app/api/example_api
FROM alpine as brahma-api
WORKDIR /go/src
@ -19,6 +19,6 @@ COPY --from=builder /go/src/api_example_api ./
ENV TZ=Asia/Shanghai
ENV env=pro
ENV endpoints=http://etcd-server:2379
RUN chmod +x ./main
RUN chmod +x ./api_example_api
EXPOSE 8080
CMD ["./main"]
CMD ["./api_example_api"]