-
Notifications
You must be signed in to change notification settings - Fork 911
Closed
Description
I'm trying to build the skopeo within a container with the following docker file.
Dockerfile
FROM golang
# Install Skopeo
RUN apt-get update && apt-get install -y \
git libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev \
&& apt-get clean
RUN git clone https://github.com/containers/skopeo $GOPATH/src/github.com/containers/skopeo \
&& cd $GOPATH/src/github.com/containers/skopeo && make binary-local-static BUILDTAGS='containers_image_openpgp containers_image_ostree_stub containers_image_storage_stub' \
&& cp $GOPATH/src/github.com/containers/skopeo/skopeo /usr/bin/skopeo
This use to work a couple months ago, but it doesn't work anymore. Did something change?
Error:
$ docker build -t container/skopeo:latest .
Sending build context to Docker daemon 4.608kB
Step 1/4 : FROM golang
---> 52b59e9ead8e
Step 2/4 : RUN apt-get update && apt-get install -y git libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev && apt-get clean
---> Using cache
---> 9d6e37aa3d97
Step 3/4 : RUN git clone https://github.com/containers/skopeo $GOPATH/src/github.com/containers/skopeo && cd $GOPATH/src/github.com/containers/skopeo && make binary-local-static BUILDTAGS='containers_image_openpgp containers_image_ostree_stub containers_image_storage_stub' && cp $GOPATH/src/github.com/containers/skopeo/skopeo /usr/bin/skopeo
---> Running in 6282f54d622d
Cloning into '/go/src/github.com/containers/skopeo'...
GO111MODULE=on go build -mod=vendor -ldflags "-extldflags \"-static\" -X main.gitCommit=ce6ec7720e33b6fac1d7e7a8c4c9af3099bfc3f9" -gcflags "" -tags "containers_image_openpgp containers_image_ostree_stub containers_image_storage_stub" -o skopeo ./cmd/skopeo
build github.com/containers/skopeo/cmd/skopeo: cannot load github.com/containers/image/v5/storage: no Go source files
make: *** [Makefile:107: binary-local-static] Error 1
The command '/bin/sh -c git clone https://github.com/containers/skopeo $GOPATH/src/github.com/containers/skopeo && cd $GOPATH/src/github.com/containers/skopeo && make binary-local-static BUILDTAGS='containers_image_openpgp containers_image_ostree_stub containers_image_storage_stub' && cp $GOPATH/src/github.com/containers/skopeo/skopeo /usr/bin/skopeo' returned a non-zero code: 2
looks like it's complaining
github.com/containers/skopeo/cmd/skopeo: cannot load github.com/containers/image/v5/storage: no Go source files
make: *** [Makefile:107: binary-local-static] Error 1
Strange thou tat I don't have any issue building this locally on a mac, but issue with building it within the container.
Thanks
Reactions are currently unavailable