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

refactor: switch to "github.com/cpuguy83/go-docker" #48

Merged
merged 11 commits into from
Jan 7, 2024
Merged
7 changes: 7 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ run:
# https://golangci-lint.run/usage/linters/
linters:
enable:
- depguard
- exhaustive
- exportloopref
- gci
Expand All @@ -53,6 +54,12 @@ linters:
- whitespace

linters-settings:
depguard:
rules:
main:
deny:
- pkg: github.com/docker/docker
msg: https://github.com/ustclug/Yuki/issues/44
gci:
sections:
- standard # Standard section: captures all standard packages.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
README
=======

[![Build Status](https://github.com/ustclug/Yuki/workflows/pr-presubmit-checks/badge.svg)](https://github.com/ustclug/Yuki/actions)
[![Presubmit Checks](https://github.com/ustclug/Yuki/actions/workflows/pr-presubmit-checks.yml/badge.svg)](https://github.com/ustclug/Yuki/actions/workflows/pr-presubmit-checks.yml)
[![Go Report](https://goreportcard.com/badge/github.com/ustclug/Yuki)](https://goreportcard.com/report/github.com/ustclug/Yuki)

- [Requirements](#requirements)
Expand Down Expand Up @@ -54,7 +54,7 @@ Setup repository:
# The repository directory must be created in advance
mkdir /tmp/repos/docker-ce

# Sync docker-ce repository from mirrors.bfsu.edu.cn
# Sync docker-ce repository from rsync.mirrors.ustc.edu.cn
cat <<EOF > /tmp/repo-configs/docker-ce.yaml
name: docker-ce
# every 1 hour
Expand All @@ -63,7 +63,7 @@ storageDir: /tmp/repos/docker-ce
image: ustcmirror/rsync:latest
logRotCycle: 2
envs:
RSYNC_HOST: mirrors.bfsu.edu.cn
RSYNC_HOST: rsync.mirrors.ustc.edu.cn
RSYNC_PATH: docker-ce/
RSYNC_EXCLUDE: --exclude=.~tmp~/
RSYNC_EXTRA: --size-only
Expand Down
28 changes: 5 additions & 23 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ module github.com/ustclug/Yuki
go 1.21

require (
// https://github.com/moby/moby/issues/46621
github.com/docker/docker v25.0.0-beta.3+incompatible
github.com/cpuguy83/go-docker v0.3.0
github.com/docker/go-units v0.5.0
github.com/go-playground/validator/v10 v10.16.0
github.com/go-resty/resty/v2 v2.11.0
Expand All @@ -15,27 +14,21 @@ require (
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.8.4
golang.org/x/sync v0.5.0
golang.org/x/sync v0.6.0
gorm.io/driver/sqlite v1.5.4
gorm.io/gorm v1.25.5
sigs.k8s.io/yaml v1.4.0
)

require (
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/distribution/reference v0.5.0 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
Expand All @@ -47,12 +40,7 @@ require (
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-sqlite3 v1.14.19 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc3 // indirect
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
Expand All @@ -62,18 +50,12 @@ require (
github.com/subosito/gotenv v1.6.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1 // indirect
go.opentelemetry.io/otel v1.21.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect
go.opentelemetry.io/otel/sdk v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.16.1 // indirect
Expand Down
Loading