mirror of https://github.com/knative/client.git
Remove -mod=readonly from the helloworld's Dockerfile (#1017)
The go.mod file was removed in
4ea31c444a
, and breaks building using Tekton.
The error is as follows:
STEP 3: COPY ./test/test_images/helloworld/ .
STEP 4: RUN CGO_ENABLED=0 GOOS=linux go build -mod=readonly -v -o server
build flag -mod=readonly only valid when using modules
subprocess exited with status 1
subprocess exited with status 1
error building at STEP "RUN CGO_ENABLED=0 GOOS=linux go build
-mod=readonly -v -o server": exit status 1
This commit is contained in:
parent
043c3b9e87
commit
1607bf8c0c
|
|
@ -10,8 +10,7 @@ WORKDIR /app
|
||||||
COPY ./test/test_images/helloworld/ .
|
COPY ./test/test_images/helloworld/ .
|
||||||
|
|
||||||
# Build the binary.
|
# Build the binary.
|
||||||
# -mod=readonly ensures immutable go.mod and go.sum in container builds.
|
RUN CGO_ENABLED=0 GOOS=linux go build -v -o server
|
||||||
RUN CGO_ENABLED=0 GOOS=linux go build -mod=readonly -v -o server
|
|
||||||
|
|
||||||
# Use the official Alpine image for a lean production container.
|
# Use the official Alpine image for a lean production container.
|
||||||
# https://hub.docker.com/_/alpine
|
# https://hub.docker.com/_/alpine
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue