Skip to content

Commit

Permalink
Remove -mod=readonly from the helloworld's Dockerfile (#1017)
Browse files Browse the repository at this point in the history
The go.mod file was removed in
4ea31c4
, 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
  • Loading branch information
mgencur authored Sep 17, 2020
1 parent 043c3b9 commit 1607bf8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/test_images/helloworld/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ WORKDIR /app
COPY ./test/test_images/helloworld/ .

# Build the binary.
# -mod=readonly ensures immutable go.mod and go.sum in container builds.
RUN CGO_ENABLED=0 GOOS=linux go build -mod=readonly -v -o server
RUN CGO_ENABLED=0 GOOS=linux go build -v -o server

# Use the official Alpine image for a lean production container.
# https://hub.docker.com/_/alpine
Expand Down

0 comments on commit 1607bf8

Please sign in to comment.