test/testvol: update container image golang to 1.18

Update the golang verion for the testvol image to the latest version
1.18. This requires us to build with GO111MODULE=off.
Use the FQDN to prevent the shortnames prompt.

Also add --network none to the podman build command to make sure we are
only using the copied deps and nothing else.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2022-06-22 13:33:37 +02:00
parent 472f79f08e
commit fcc25afa55
2 changed files with 3 additions and 3 deletions

View File

@ -229,7 +229,7 @@ test/testvol/testvol: $(wildcard test/testvol/*.go)
.PHONY: volume-plugin-test-img
volume-plugin-test-img:
podman build -t quay.io/libpod/volume-plugin-test-img:$$(date +%Y%m%d) -f ./test/testvol/Containerfile .
./bin/podman build --network none -t quay.io/libpod/volume-plugin-test-img:$$(date +%Y%m%d) -f ./test/testvol/Containerfile .
.PHONY: test/goecho/goecho
test/goecho/goecho: $(wildcard test/goecho/*.go)

View File

@ -1,8 +1,8 @@
FROM golang:1.15-alpine AS build-img
FROM docker.io/library/golang:1.18-alpine AS build-img
COPY ./test/testvol/ /go/src/github.com/containers/podman/cmd/testvol/
COPY ./vendor /go/src/github.com/containers/podman/vendor/
WORKDIR /go/src/github.com/containers/podman
RUN go build -o /testvol ./cmd/testvol
RUN GO111MODULE=off go build -o /testvol ./cmd/testvol
FROM alpine
COPY --from=build-img /testvol /usr/local/bin