-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
https://github.com/containerd Subproject checklist (EDIT: added by @AkihiroSuda )
- containerd
- cri: Move to go modules cri#1377
- imgcrypt: Move to go modules imgcrypt#7
- cgroups
- console
- go-runc: add go.mod go-runc#59
- continuity
- go-cni
- aufs: Move to go modules aufs#18
- zfs: add go.mod zfs#26
- ttrpc
- release-tool: Move to go modules release-tool#8
- typeurl
- fifo: add go.mod fifo#22
- btrfs: Move repo to go modules btrfs#22
- stargz-snapshotter: Move to go modules stargz-snapshotter#65
Description
Containerd currently causes issues for downstream projects using go mod
. Since this is the official Go dependency management tool now, support would be nice.
Steps to reproduce the issue:
- Import containerd from a project using
go mod
for dependency management. - Build the project
Describe the results you received:
Does not build. Specifically due to the following.
# github.com/containerd/containerd/images/archive
/home/ry/go/pkg/mod/github.com/containerd/containerd@v1.2.4/images/archive/reference.go:72:21: undefined: reference.ParseDockerRef
Module based builds were actually working fine until this commit ed756ff which introduced a dependency on code that is only in the master branch of docker/distribution.
As a workaround we currently use
replace github.com/docker/distribution v2.7.1+incompatible => github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible
in our go.mod file. But this is not really maintainable and also slows down built time significantly as it requires re-download of certain modules on every build.
Describe the results you expected:
Project builds.
Output of containerd --version
:
containerd github.com/containerd/containerd v1.2.2 9754871865f7fe2f4e74d43e2fc7ccd237edcbce
Thanks