File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 9
9
# .goreleaser.yml
10
10
builds :
11
11
- id : default
12
+ env :
13
+ - CGO_ENABLED=0
12
14
main : ./cmd/kcl/main.go
13
15
binary : kcl
14
16
goos :
@@ -18,8 +20,6 @@ builds:
18
20
goarch :
19
21
- amd64
20
22
- arm64
21
- flags :
22
- - -tags=rpc
23
23
ldflags :
24
24
- " -X kcl-lang.io/cli/pkg/version.version={{.Version}}"
25
25
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ WORKDIR /src
9
9
ARG TARGETOS
10
10
ARG TARGETARCH
11
11
12
+ ENV CGO_ENABLED=0
13
+
12
14
RUN --mount=type=cache,target=/go/pkg --mount=type=cache,target=/root/.cache/go-build GOOS=${TARGETOS} GOARCH=${TARGETARCH} make build
13
15
14
16
FROM --platform=${BUILDPLATFORM} ubuntu:22.04 AS base
@@ -20,16 +22,11 @@ ARG TARGETARCH
20
22
21
23
COPY --from=build /src/bin/kcl /usr/local/bin/kcl
22
24
RUN /usr/local/bin/kcl
23
- RUN cp -r /root/go/bin/* /usr/local/bin/
24
25
RUN apt-get update && apt-get install make gcc git -y && rm -rf /var/lib/apt/lists/*
25
26
# The reason for doing this below is to prevent the
26
27
# container from not having write permissions.
27
28
ENV KCL_PKG_PATH=/tmp
28
29
ENV KCL_CACHE_PATH=/tmp
29
- # In the image, we can generate a runtime in advance to
30
- # avoid writing files in the image
31
- ENV KCL_GO_DISABLE_INSTALL_ARTIFACT=true
32
- ENV KCL_GO_DISABLE_ARTIFACT_IN_PATH=false
33
30
# Install the tini
34
31
ENV TINI_VERSION v0.19.0
35
32
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TARGETARCH} /tini
You can’t perform that action at this time.
0 commit comments