Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for socketless image copy #63

Merged
merged 5 commits into from
May 20, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ ENV CGO_ENABLED=0

WORKDIR /build
COPY . /build

# SINKER_VERSION is set during the release process
ARG SINKER_VERSION=0.0.0
RUN go build -ldflags="-X 'github.com/plexsystems/sinker/internal/commands.sinkerVersion=${SINKER_VERSION}'"
RUN go build -tags 'containers_image_openpgp' -ldflags="-X 'github.com/plexsystems/sinker/internal/commands.sinkerVersion=${SINKER_VERSION}'"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jpreese fyi, this will affect the build pipeline too.
As per https://github.com/containers/image/blob/main/README.md#supported-build-tags

Use a Golang-only OpenPGP implementation for signature verification instead of the default cgo/gpgme-based implementation; the primary downside is that creating new signatures with the Golang-only implementation is not supported.

Which should not affect us, as I don't think generating signatures would be outside the problem domain sinker addresses.


FROM alpine:3.14.3

Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
GO_TAGS=-tags 'containers_image_openpgp'
.PHONY: build
build:
@go build -ldflags="-X 'github.com/plexsystems/sinker/internal/commands.sinkerVersion=$$(git describe --tags --always --dirty)'"
@go build $(GO_TAGS) -ldflags="-X 'github.com/plexsystems/sinker/internal/commands.sinkerVersion=$$(git describe --tags --always --dirty)'"

.PHONY: test
test:
Expand All @@ -23,6 +24,6 @@ all: build test acceptance
release:
@test $(version)
@docker build --build-arg SINKER_VERSION=$(version) -t plexsystems/sinker:$(version) .
@GOOS=darwin GOARCH=amd64 go build -o sinker-darwin-amd64 -ldflags="-X 'github.com/plexsystems/sinker/internal/commands.sinkerVersion=$(version)'"
@GOOS=windows GOARCH=amd64 go build -o sinker-windows-amd64 -ldflags="-X 'github.com/plexsystems/sinker/internal/commands.sinkerVersion=$(version)'"
@GOOS=linux GOARCH=amd64 go build -o sinker-linux-amd64 -ldflags="-X 'github.com/plexsystems/sinker/internal/commands.sinkerVersion=$(version)'"
@GOOS=darwin GOARCH=amd64 go build $(GO_TAGS) -o sinker-darwin-amd64 -ldflags="-X 'github.com/plexsystems/sinker/internal/commands.sinkerVersion=$(version)'"
@GOOS=windows GOARCH=amd64 go build $(GO_TAGS) -o sinker-windows-amd64 -ldflags="-X 'github.com/plexsystems/sinker/internal/commands.sinkerVersion=$(version)'"
@GOOS=linux GOARCH=amd64 go build $(GO_TAGS) -o sinker-linux-amd64 -ldflags="-X 'github.com/plexsystems/sinker/internal/commands.sinkerVersion=$(version)'"
52 changes: 41 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,21 +1,51 @@
module github.com/plexsystems/sinker

go 1.14
go 1.15

require (
github.com/Azure/go-autorest/autorest/azure/auth v0.4.2 // indirect
github.com/Djarvur/go-err113 v0.1.0 // indirect
github.com/apex/log v1.3.0 // indirect
github.com/avast/retry-go v2.6.0+incompatible
github.com/containerd/containerd v1.3.6 // indirect
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c // indirect
github.com/bombsimon/wsl/v2 v2.2.0 // indirect
github.com/bombsimon/wsl/v3 v3.1.0 // indirect
github.com/containers/image v1.5.1 // indirect
github.com/containers/image/v5 v5.20.0
// github.com/containers/image/v5/docker v5.20.0
github.com/coreos/prometheus-operator v0.40.0
github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7
github.com/docker/docker v20.10.12+incompatible
github.com/ghodss/yaml v1.0.0
github.com/google/go-containerregistry v0.1.1
github.com/go-critic/go-critic v0.4.3 // indirect
github.com/go-toolsmith/typep v1.0.2 // indirect
github.com/golangci/gocyclo v0.0.0-20180528144436-0a533e8fa43d // indirect
github.com/golangci/misspell v0.3.5 // indirect
github.com/golangci/revgrep v0.0.0-20180812185044-276a5c0a1039 // indirect
github.com/google/go-containerregistry v0.5.1
github.com/google/wire v0.4.0 // indirect
github.com/goreleaser/goreleaser v0.136.0 // indirect
github.com/goreleaser/nfpm v1.3.0 // indirect
github.com/gostaticanalysis/analysisutil v0.0.3 // indirect
github.com/hashicorp/go-retryablehttp v0.6.6 // indirect
github.com/hashicorp/go-version v1.2.1
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect
github.com/mattn/go-ieproxy v0.0.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/sirupsen/logrus v1.6.0
github.com/spf13/cobra v1.0.0
github.com/spf13/viper v1.7.0
google.golang.org/grpc v1.30.0 // indirect
gopkg.in/yaml.v2 v2.3.0
k8s.io/api v0.18.6
k8s.io/apimachinery v0.18.6
github.com/ryancurrah/gomodguard v1.1.0 // indirect
github.com/securego/gosec v0.0.0-20200401082031-e946c8c39989 // indirect
github.com/sirupsen/logrus v1.8.1
github.com/sourcegraph/go-diff v0.5.3 // indirect
github.com/spf13/cobra v1.3.0
github.com/spf13/viper v1.10.0
github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b // indirect
github.com/tetafro/godot v0.4.2 // indirect
github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94 // indirect
github.com/vdemeester/k8s-pkg-credentialprovider v1.17.4 // indirect
github.com/xanzy/go-gitlab v0.32.0 // indirect
gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e // indirect
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.20.6
k8s.io/apimachinery v0.20.6
mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7 // indirect
sourcegraph.com/sqs/pbtypes v1.0.0 // indirect
)
Loading