Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit 140661c

Browse files
authored
Set com.docker.extension.categories and fix vulnerabilities (#99)
* Set com.docker.extension.categories * Trigger CI * Fix vulnerabilities and upgrade base image to Go 1.19
1 parent 8b3a8fb commit 140661c

31 files changed

+108
-762
lines changed

.github/workflows/build-scan-push.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
if: matrix.os != 'self-hosted'
2525
uses: actions/setup-go@v3
2626
with:
27-
go-version: 1.17
27+
go-version: 1.19
2828

2929
- name: Build
3030
working-directory: vm
@@ -53,7 +53,7 @@ jobs:
5353
- name: Set up Go
5454
uses: actions/setup-go@v3
5555
with:
56-
go-version: 1.17
56+
go-version: 1.19
5757

5858
- name: Set up QEMU
5959
uses: docker/setup-qemu-action@v1

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.17-alpine@sha256:99ddec1bbfd6d6bca3f9804c02363daee8c8524dae50df7942e8e60788fd17c9 AS builder
1+
FROM golang:1.19-alpine AS builder
22
ENV CGO_ENABLED=0
33
WORKDIR /backend
44
COPY vm/go.* .
@@ -36,7 +36,7 @@ RUN apk update \
3636
RUN curl -fL "https://download.docker.com/linux/static/stable/$(uname -m)/docker-${CLI_VERSION}.tgz" | tar zxf - --strip-components 1 docker/docker \
3737
&& chmod +x /docker
3838

39-
FROM --platform=$BUILDPLATFORM golang:1.17-alpine@sha256:99ddec1bbfd6d6bca3f9804c02363daee8c8524dae50df7942e8e60788fd17c9 AS docker-credentials-client-builder
39+
FROM --platform=$BUILDPLATFORM golang:1.19-alpine AS docker-credentials-client-builder
4040
ENV CGO_ENABLED=0
4141
WORKDIR /output
4242
RUN apk update \
@@ -98,7 +98,8 @@ LABEL org.opencontainers.image.title="Volumes Backup & Share" \
9898
<li>Fixed a bug where the clone operation will not validate whether the destination volume already existed.</li> \
9999
<li>Added error tracking to detect issues before users report them.</li> \
100100
<li>Fixed new vulnerabilities detected in the Dockerfile.</li> \
101-
</ul>"
101+
</ul>" \
102+
com.docker.extension.categories="volumes"
102103

103104
WORKDIR /
104105
COPY docker-compose.yaml .

client/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ require (
3939
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
4040
golang.org/x/net v0.0.0-20220906165146-f3363e06e74c // indirect
4141
golang.org/x/sys v0.0.0-20220804214406-8e32c043e418 // indirect
42-
golang.org/x/text v0.3.7 // indirect
4342
google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a // indirect
4443
google.golang.org/grpc v1.33.2 // indirect
4544
google.golang.org/protobuf v1.28.1 // indirect

client/go.sum

Lines changed: 0 additions & 531 deletions
Large diffs are not rendered by default.

vm/go.mod

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,58 +3,46 @@ module github.com/docker/volumes-backup-extension
33
go 1.17
44

55
require (
6-
github.com/docker/cli v20.10.17+incompatible
76
github.com/docker/distribution v2.8.1+incompatible
87
github.com/docker/docker v20.10.17+incompatible
98
github.com/docker/go-connections v0.4.0
10-
github.com/labstack/echo v3.3.10+incompatible
9+
github.com/klauspost/compress v1.15.10
1110
github.com/sirupsen/logrus v1.8.1
1211
github.com/stretchr/testify v1.7.0
1312
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
13+
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
1414
)
1515

16-
require github.com/klauspost/compress v1.15.10 // indirect
17-
1816
require (
19-
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
2017
github.com/Microsoft/go-winio v0.5.2 // indirect
21-
github.com/beorn7/perks v1.0.1 // indirect
22-
github.com/bugsnag/bugsnag-go/v2 v2.1.2 // indirect
18+
github.com/bugsnag/bugsnag-go/v2 v2.1.2
2319
github.com/bugsnag/panicwrap v1.3.4 // indirect
24-
github.com/cespare/xxhash/v2 v2.1.1 // indirect
2520
github.com/davecgh/go-spew v1.1.1 // indirect
26-
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
27-
github.com/docker/docker-credential-helpers v0.6.4 // indirect
28-
github.com/docker/go-metrics v0.0.1 // indirect
2921
github.com/docker/go-units v0.4.0 // indirect
30-
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 // indirect
3122
github.com/gofrs/uuid v4.0.0+incompatible // indirect
3223
github.com/gogo/protobuf v1.3.2 // indirect
33-
github.com/golang/protobuf v1.4.3 // indirect
34-
github.com/gorilla/mux v1.8.0 // indirect
3524
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect
36-
github.com/labstack/gommon v0.3.1 // indirect
37-
github.com/mattn/go-colorable v0.1.11 // indirect
38-
github.com/mattn/go-isatty v0.0.14 // indirect
39-
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
25+
github.com/labstack/gommon v0.4.0 // indirect
26+
github.com/mattn/go-colorable v0.1.13 // indirect
27+
github.com/mattn/go-isatty v0.0.16 // indirect
4028
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
4129
github.com/morikuni/aec v1.0.0 // indirect
4230
github.com/opencontainers/go-digest v1.0.0 // indirect
4331
github.com/opencontainers/image-spec v1.0.2 // indirect
4432
github.com/pkg/errors v0.9.1 // indirect
4533
github.com/pmezard/go-difflib v1.0.0 // indirect
46-
github.com/prometheus/client_golang v1.11.1 // indirect
47-
github.com/prometheus/client_model v0.2.0 // indirect
48-
github.com/prometheus/common v0.26.0 // indirect
49-
github.com/prometheus/procfs v0.6.0 // indirect
5034
github.com/valyala/bytebufferpool v1.0.0 // indirect
51-
github.com/valyala/fasttemplate v1.2.1 // indirect
52-
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
53-
golang.org/x/net v0.0.0-20220906165146-f3363e06e74c // indirect
54-
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
55-
golang.org/x/text v0.3.7 // indirect v0.0.0-20220708220712-1185a9018129
35+
github.com/valyala/fasttemplate v1.2.2 // indirect
36+
golang.org/x/crypto v0.3.0 // indirect
37+
golang.org/x/net v0.2.0 // indirect
38+
golang.org/x/sys v0.2.0 // indirect
39+
golang.org/x/text v0.4.0 // indirect; indirect v0.0.0-20220708220712-1185a9018129
5640
golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect
57-
google.golang.org/protobuf v1.26.0-rc.1 // indirect
5841
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
5942
gotest.tools/v3 v3.3.0 // indirect
6043
)
44+
45+
require (
46+
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
47+
github.com/labstack/echo/v4 v4.9.1
48+
)

0 commit comments

Comments
 (0)