Upgrade: update dependencies and refactor Docker client usage
- Update Go version to 1.23 - Upgrade various dependencies to latest versions - Refactor Docker client usage to match updated API - Update container and image related functions to use new types - Adjust import paths for Docker types
- commit
- 5e4df08d05ba35e80a7c56af869fb9a3dae3191b
- author
- bamen · · 2024-08-27 04:20 UTC
- parent
- bb1fc49
- signature
- unsigned
8 files · +226 -358
D .iscontainer-bak +0 -0
no textual change.
M go.mod +55 -79
| @@ -1,125 +1,101 @@ | |||
| 1 | 1 | module github.com/bnema/gordon | |
| 2 | 2 | ||
| 3 | - | go 1.21.3 | |
| 3 | + | go 1.23 | |
| 4 | 4 | ||
| 5 | 5 | require ( | |
| 6 | 6 | github.com/AlecAivazis/survey/v2 v2.3.7 | |
| 7 | - | github.com/PuerkitoBio/goquery v1.8.1 | |
| 8 | - | github.com/charmbracelet/bubbles v0.16.1 | |
| 9 | - | github.com/charmbracelet/bubbletea v0.24.1 | |
| 10 | - | github.com/charmbracelet/lipgloss v0.7.1 | |
| 11 | - | github.com/containerd/containerd v1.7.15 | |
| 12 | - | github.com/docker/docker v24.0.6+incompatible | |
| 13 | - | github.com/docker/go-connections v0.4.0 | |
| 14 | - | github.com/fatih/color v1.15.0 | |
| 15 | - | github.com/gorilla/sessions v1.2.1 | |
| 7 | + | github.com/PuerkitoBio/goquery v1.9.2 | |
| 8 | + | github.com/charmbracelet/bubbles v0.19.0 | |
| 9 | + | github.com/charmbracelet/bubbletea v0.27.1 | |
| 10 | + | github.com/charmbracelet/lipgloss v0.13.0 | |
| 11 | + | github.com/docker/docker v27.1.2+incompatible | |
| 12 | + | github.com/docker/go-connections v0.5.0 | |
| 13 | + | github.com/fatih/color v1.17.0 | |
| 14 | + | github.com/gorilla/sessions v1.4.0 | |
| 16 | 15 | github.com/joho/godotenv v1.5.1 | |
| 17 | - | github.com/labstack/echo-contrib v0.15.0 | |
| 18 | - | github.com/labstack/echo/v4 v4.11.2 | |
| 19 | - | github.com/microcosm-cc/bluemonday v1.0.25 | |
| 20 | - | github.com/pocketbase/pocketbase v0.19.3 | |
| 21 | - | github.com/spf13/cobra v1.7.0 | |
| 16 | + | github.com/labstack/echo-contrib v0.17.1 | |
| 17 | + | github.com/labstack/echo/v4 v4.12.0 | |
| 18 | + | github.com/microcosm-cc/bluemonday v1.0.27 | |
| 19 | + | github.com/pocketbase/pocketbase v0.22.19 | |
| 20 | + | github.com/spf13/cobra v1.8.1 | |
| 22 | 21 | gopkg.in/yaml.v3 v3.0.1 | |
| 23 | - | modernc.org/sqlite v1.26.0 | |
| 22 | + | modernc.org/sqlite v1.32.0 | |
| 24 | 23 | ) | |
| 25 | 24 | ||
| 26 | 25 | require ( | |
| 27 | - | github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect | |
| 28 | - | github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 // indirect | |
| 29 | - | github.com/Microsoft/hcsshim v0.11.4 // indirect | |
| 30 | 26 | github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect | |
| 31 | 27 | github.com/charmbracelet/harmonica v0.2.0 // indirect | |
| 32 | - | github.com/containerd/cgroups v1.1.0 // indirect | |
| 33 | - | github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect | |
| 34 | - | github.com/containerd/continuity v0.4.2 // indirect | |
| 35 | - | github.com/containerd/fifo v1.1.0 // indirect | |
| 28 | + | github.com/charmbracelet/x/ansi v0.2.3 // indirect | |
| 29 | + | github.com/charmbracelet/x/term v0.2.0 // indirect | |
| 36 | 30 | github.com/containerd/log v0.1.0 // indirect | |
| 37 | - | github.com/containerd/ttrpc v1.2.3 // indirect | |
| 38 | - | github.com/containerd/typeurl/v2 v2.1.1 // indirect | |
| 39 | 31 | github.com/creack/pty v1.1.18 // indirect | |
| 40 | - | github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect | |
| 32 | + | github.com/distribution/reference v0.6.0 // indirect | |
| 41 | 33 | github.com/dustin/go-humanize v1.0.1 // indirect | |
| 42 | - | github.com/felixge/httpsnoop v1.0.3 // indirect | |
| 43 | - | github.com/go-logr/logr v1.2.4 // indirect | |
| 34 | + | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | |
| 35 | + | github.com/felixge/httpsnoop v1.0.4 // indirect | |
| 36 | + | github.com/go-logr/logr v1.4.2 // indirect | |
| 44 | 37 | github.com/go-logr/stdr v1.2.2 // indirect | |
| 45 | - | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect | |
| 46 | - | github.com/golang/protobuf v1.5.4 // indirect | |
| 47 | - | github.com/google/go-cmp v0.5.9 // indirect | |
| 38 | + | github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect | |
| 48 | 39 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | |
| 49 | 40 | github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect | |
| 50 | - | github.com/klauspost/compress v1.16.0 // indirect | |
| 51 | - | github.com/kr/text v0.2.0 // indirect | |
| 41 | + | github.com/kr/pretty v0.3.1 // indirect | |
| 52 | 42 | github.com/lucasb-eyer/go-colorful v1.2.0 // indirect | |
| 53 | 43 | github.com/mattn/go-localereader v0.0.1 // indirect | |
| 54 | - | github.com/mattn/go-runewidth v0.0.15 // indirect | |
| 44 | + | github.com/mattn/go-runewidth v0.0.16 // indirect | |
| 55 | 45 | github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect | |
| 56 | - | github.com/moby/locker v1.0.1 // indirect | |
| 57 | - | github.com/moby/sys/mountinfo v0.6.2 // indirect | |
| 58 | - | github.com/moby/sys/sequential v0.5.0 // indirect | |
| 59 | - | github.com/moby/sys/signal v0.7.0 // indirect | |
| 60 | - | github.com/moby/sys/user v0.1.0 // indirect | |
| 61 | - | github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect | |
| 46 | + | github.com/moby/docker-image-spec v1.3.1 // indirect | |
| 47 | + | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect | |
| 62 | 48 | github.com/muesli/cancelreader v0.2.2 // indirect | |
| 63 | - | github.com/muesli/reflow v0.3.0 // indirect | |
| 64 | - | github.com/muesli/termenv v0.15.1 // indirect | |
| 65 | - | github.com/opencontainers/runtime-spec v1.1.0 // indirect | |
| 66 | - | github.com/opencontainers/selinux v1.11.0 // indirect | |
| 49 | + | github.com/muesli/termenv v0.15.2 // indirect | |
| 50 | + | github.com/ncruces/go-strftime v0.1.9 // indirect | |
| 67 | 51 | github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect | |
| 68 | - | github.com/rivo/uniseg v0.4.4 // indirect | |
| 69 | - | github.com/sirupsen/logrus v1.9.3 // indirect | |
| 52 | + | github.com/rivo/uniseg v0.4.7 // indirect | |
| 70 | 53 | github.com/spf13/pflag v1.0.5 // indirect | |
| 71 | - | go.opencensus.io v0.24.0 // indirect | |
| 72 | - | go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect | |
| 73 | - | go.opentelemetry.io/otel v1.19.0 // indirect | |
| 74 | - | go.opentelemetry.io/otel/metric v1.19.0 // indirect | |
| 75 | - | go.opentelemetry.io/otel/trace v1.19.0 // indirect | |
| 76 | - | golang.org/x/sync v0.4.0 // indirect | |
| 77 | - | golang.org/x/term v0.13.0 // indirect | |
| 78 | - | google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a // indirect | |
| 79 | - | google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect | |
| 80 | - | google.golang.org/grpc v1.59.0 // indirect | |
| 81 | - | google.golang.org/protobuf v1.33.0 // indirect | |
| 82 | - | lukechampine.com/uint128 v1.3.0 // indirect | |
| 83 | - | modernc.org/cc/v3 v3.41.0 // indirect | |
| 84 | - | modernc.org/ccgo/v3 v3.16.15 // indirect | |
| 85 | - | modernc.org/libc v1.29.0 // indirect | |
| 54 | + | go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect | |
| 55 | + | go.opentelemetry.io/otel v1.29.0 // indirect | |
| 56 | + | go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 // indirect | |
| 57 | + | go.opentelemetry.io/otel/metric v1.29.0 // indirect | |
| 58 | + | go.opentelemetry.io/otel/sdk v1.21.0 // indirect | |
| 59 | + | go.opentelemetry.io/otel/trace v1.29.0 // indirect | |
| 60 | + | golang.org/x/sync v0.8.0 // indirect | |
| 61 | + | golang.org/x/term v0.23.0 // indirect | |
| 62 | + | google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect | |
| 63 | + | modernc.org/gc/v3 v3.0.0-20240801135723-a856999a2e4a // indirect | |
| 64 | + | modernc.org/libc v1.59.9 // indirect | |
| 86 | 65 | modernc.org/mathutil v1.6.0 // indirect | |
| 87 | - | modernc.org/memory v1.7.2 // indirect | |
| 88 | - | modernc.org/opt v0.1.3 // indirect | |
| 66 | + | modernc.org/memory v1.8.0 // indirect | |
| 89 | 67 | modernc.org/strutil v1.2.0 // indirect | |
| 90 | 68 | modernc.org/token v1.1.0 // indirect | |
| 91 | 69 | ) | |
| 92 | 70 | ||
| 93 | 71 | require ( | |
| 94 | - | github.com/Microsoft/go-winio v0.6.1 // indirect | |
| 95 | - | github.com/andybalholm/cascadia v1.3.1 // indirect | |
| 72 | + | github.com/Microsoft/go-winio v0.6.2 // indirect | |
| 73 | + | github.com/andybalholm/cascadia v1.3.2 // indirect | |
| 96 | 74 | github.com/aymerick/douceur v0.2.0 // indirect | |
| 97 | - | github.com/docker/distribution v2.8.2+incompatible // indirect | |
| 98 | 75 | github.com/docker/go-units v0.5.0 // indirect | |
| 99 | 76 | github.com/gogo/protobuf v1.3.2 // indirect | |
| 100 | 77 | github.com/golang-jwt/jwt v3.2.2+incompatible // indirect | |
| 101 | - | github.com/google/uuid v1.4.0 // direct | |
| 102 | - | github.com/gorilla/context v1.1.1 // indirect | |
| 103 | - | github.com/gorilla/css v1.0.0 // indirect | |
| 104 | - | github.com/gorilla/securecookie v1.1.1 // indirect | |
| 105 | - | github.com/labstack/gommon v0.4.0 // indirect | |
| 78 | + | github.com/google/uuid v1.6.0 // direct | |
| 79 | + | github.com/gorilla/context v1.1.2 // indirect | |
| 80 | + | github.com/gorilla/css v1.0.1 // indirect | |
| 81 | + | github.com/gorilla/securecookie v1.1.2 // indirect | |
| 82 | + | github.com/labstack/gommon v0.4.2 // indirect | |
| 106 | 83 | github.com/mattn/go-colorable v0.1.13 // indirect | |
| 107 | 84 | github.com/mattn/go-isatty v0.0.20 // indirect | |
| 108 | 85 | github.com/moby/term v0.5.0 // indirect | |
| 109 | 86 | github.com/morikuni/aec v1.0.0 // indirect | |
| 110 | 87 | github.com/opencontainers/go-digest v1.0.0 // indirect | |
| 111 | - | github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect | |
| 88 | + | github.com/opencontainers/image-spec v1.1.0 // indirect | |
| 112 | 89 | github.com/pkg/errors v0.9.1 // indirect | |
| 113 | 90 | github.com/rogpeppe/go-internal v1.11.0 // indirect | |
| 114 | 91 | github.com/valyala/bytebufferpool v1.0.0 // indirect | |
| 115 | 92 | github.com/valyala/fasttemplate v1.2.2 // indirect | |
| 116 | - | golang.org/x/crypto v0.14.0 // indirect | |
| 117 | - | golang.org/x/mod v0.13.0 // indirect | |
| 118 | - | golang.org/x/net v0.17.0 // indirect | |
| 119 | - | golang.org/x/sys v0.13.0 // indirect | |
| 120 | - | golang.org/x/text v0.13.0 // indirect | |
| 121 | - | golang.org/x/time v0.3.0 // indirect | |
| 122 | - | golang.org/x/tools v0.14.0 // indirect | |
| 93 | + | golang.org/x/crypto v0.26.0 // indirect | |
| 94 | + | golang.org/x/net v0.28.0 // indirect | |
| 95 | + | golang.org/x/sys v0.24.0 // indirect | |
| 96 | + | golang.org/x/text v0.17.0 // indirect | |
| 97 | + | golang.org/x/time v0.6.0 // indirect | |
| 98 | + | golang.org/x/tools v0.24.0 // indirect | |
| 123 | 99 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect | |
| 124 | 100 | gotest.tools/v3 v3.5.0 // indirect | |
| 125 | 101 | ) | |
| @@ -1,125 +1,101 @@ | |||||
| 1 | module github.com/bnema/gordon | 1 | module github.com/bnema/gordon | ||
| 2 | 2 | ||||
| 3 | - | go 1.21.3 | 3 | + | go 1.23 |
| 4 | 4 | ||||
| 5 | require ( | 5 | require ( | ||
| 6 | github.com/AlecAivazis/survey/v2 v2.3.7 | 6 | github.com/AlecAivazis/survey/v2 v2.3.7 | ||
| 7 | - | github.com/PuerkitoBio/goquery v1.8.1 | 7 | + | github.com/PuerkitoBio/goquery v1.9.2 |
| 8 | - | github.com/charmbracelet/bubbles v0.16.1 | 8 | + | github.com/charmbracelet/bubbles v0.19.0 |
| 9 | - | github.com/charmbracelet/bubbletea v0.24.1 | 9 | + | github.com/charmbracelet/bubbletea v0.27.1 |
| 10 | - | github.com/charmbracelet/lipgloss v0.7.1 | 10 | + | github.com/charmbracelet/lipgloss v0.13.0 |
| 11 | - | github.com/containerd/containerd v1.7.15 | 11 | + | github.com/docker/docker v27.1.2+incompatible |
| 12 | - | github.com/docker/docker v24.0.6+incompatible | 12 | + | github.com/docker/go-connections v0.5.0 |
| 13 | - | github.com/docker/go-connections v0.4.0 | 13 | + | github.com/fatih/color v1.17.0 |
| 14 | - | github.com/fatih/color v1.15.0 | 14 | + | github.com/gorilla/sessions v1.4.0 |
| 15 | - | github.com/gorilla/sessions v1.2.1 | |||
| 16 | github.com/joho/godotenv v1.5.1 | 15 | github.com/joho/godotenv v1.5.1 | ||
| 17 | - | github.com/labstack/echo-contrib v0.15.0 | 16 | + | github.com/labstack/echo-contrib v0.17.1 |
| 18 | - | github.com/labstack/echo/v4 v4.11.2 | 17 | + | github.com/labstack/echo/v4 v4.12.0 |
| 19 | - | github.com/microcosm-cc/bluemonday v1.0.25 | 18 | + | github.com/microcosm-cc/bluemonday v1.0.27 |
| 20 | - | github.com/pocketbase/pocketbase v0.19.3 | 19 | + | github.com/pocketbase/pocketbase v0.22.19 |
| 21 | - | github.com/spf13/cobra v1.7.0 | 20 | + | github.com/spf13/cobra v1.8.1 |
| 22 | gopkg.in/yaml.v3 v3.0.1 | 21 | gopkg.in/yaml.v3 v3.0.1 | ||
| 23 | - | modernc.org/sqlite v1.26.0 | 22 | + | modernc.org/sqlite v1.32.0 |
| 24 | ) | 23 | ) | ||
| 25 | 24 | ||||
| 26 | require ( | 25 | require ( | ||
| 27 | - | github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect | |||
| 28 | - | github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 // indirect | |||
| 29 | - | github.com/Microsoft/hcsshim v0.11.4 // indirect | |||
| 30 | github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect | 26 | github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect | ||
| 31 | github.com/charmbracelet/harmonica v0.2.0 // indirect | 27 | github.com/charmbracelet/harmonica v0.2.0 // indirect | ||
| 32 | - | github.com/containerd/cgroups v1.1.0 // indirect | 28 | + | github.com/charmbracelet/x/ansi v0.2.3 // indirect |
| 33 | - | github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect | 29 | + | github.com/charmbracelet/x/term v0.2.0 // indirect |
| 34 | - | github.com/containerd/continuity v0.4.2 // indirect | |||
| 35 | - | github.com/containerd/fifo v1.1.0 // indirect | |||
| 36 | github.com/containerd/log v0.1.0 // indirect | 30 | github.com/containerd/log v0.1.0 // indirect | ||
| 37 | - | github.com/containerd/ttrpc v1.2.3 // indirect | |||
| 38 | - | github.com/containerd/typeurl/v2 v2.1.1 // indirect | |||
| 39 | github.com/creack/pty v1.1.18 // indirect | 31 | github.com/creack/pty v1.1.18 // indirect | ||
| 40 | - | github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c // indirect | 32 | + | github.com/distribution/reference v0.6.0 // indirect |
| 41 | github.com/dustin/go-humanize v1.0.1 // indirect | 33 | github.com/dustin/go-humanize v1.0.1 // indirect | ||
| 42 | - | github.com/felixge/httpsnoop v1.0.3 // indirect | 34 | + | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect |
| 43 | - | github.com/go-logr/logr v1.2.4 // indirect | 35 | + | github.com/felixge/httpsnoop v1.0.4 // indirect |
| 36 | + | github.com/go-logr/logr v1.4.2 // indirect | |||
| 44 | github.com/go-logr/stdr v1.2.2 // indirect | 37 | github.com/go-logr/stdr v1.2.2 // indirect | ||
| 45 | - | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect | 38 | + | github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect |
| 46 | - | github.com/golang/protobuf v1.5.4 // indirect | |||
| 47 | - | github.com/google/go-cmp v0.5.9 // indirect | |||
| 48 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | 39 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
| 49 | github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect | 40 | github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect | ||
| 50 | - | github.com/klauspost/compress v1.16.0 // indirect | 41 | + | github.com/kr/pretty v0.3.1 // indirect |
| 51 | - | github.com/kr/text v0.2.0 // indirect | |||
| 52 | github.com/lucasb-eyer/go-colorful v1.2.0 // indirect | 42 | github.com/lucasb-eyer/go-colorful v1.2.0 // indirect | ||
| 53 | github.com/mattn/go-localereader v0.0.1 // indirect | 43 | github.com/mattn/go-localereader v0.0.1 // indirect | ||
| 54 | - | github.com/mattn/go-runewidth v0.0.15 // indirect | 44 | + | github.com/mattn/go-runewidth v0.0.16 // indirect |
| 55 | github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect | 45 | github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect | ||
| 56 | - | github.com/moby/locker v1.0.1 // indirect | 46 | + | github.com/moby/docker-image-spec v1.3.1 // indirect |
| 57 | - | github.com/moby/sys/mountinfo v0.6.2 // indirect | 47 | + | github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect |
| 58 | - | github.com/moby/sys/sequential v0.5.0 // indirect | |||
| 59 | - | github.com/moby/sys/signal v0.7.0 // indirect | |||
| 60 | - | github.com/moby/sys/user v0.1.0 // indirect | |||
| 61 | - | github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect | |||
| 62 | github.com/muesli/cancelreader v0.2.2 // indirect | 48 | github.com/muesli/cancelreader v0.2.2 // indirect | ||
| 63 | - | github.com/muesli/reflow v0.3.0 // indirect | 49 | + | github.com/muesli/termenv v0.15.2 // indirect |
| 64 | - | github.com/muesli/termenv v0.15.1 // indirect | 50 | + | github.com/ncruces/go-strftime v0.1.9 // indirect |
| 65 | - | github.com/opencontainers/runtime-spec v1.1.0 // indirect | |||
| 66 | - | github.com/opencontainers/selinux v1.11.0 // indirect | |||
| 67 | github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect | 51 | github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect | ||
| 68 | - | github.com/rivo/uniseg v0.4.4 // indirect | 52 | + | github.com/rivo/uniseg v0.4.7 // indirect |
| 69 | - | github.com/sirupsen/logrus v1.9.3 // indirect | |||
| 70 | github.com/spf13/pflag v1.0.5 // indirect | 53 | github.com/spf13/pflag v1.0.5 // indirect | ||
| 71 | - | go.opencensus.io v0.24.0 // indirect | 54 | + | go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect |
| 72 | - | go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect | 55 | + | go.opentelemetry.io/otel v1.29.0 // indirect |
| 73 | - | go.opentelemetry.io/otel v1.19.0 // indirect | 56 | + | go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 // indirect |
| 74 | - | go.opentelemetry.io/otel/metric v1.19.0 // indirect | 57 | + | go.opentelemetry.io/otel/metric v1.29.0 // indirect |
| 75 | - | go.opentelemetry.io/otel/trace v1.19.0 // indirect | 58 | + | go.opentelemetry.io/otel/sdk v1.21.0 // indirect |
| 76 | - | golang.org/x/sync v0.4.0 // indirect | 59 | + | go.opentelemetry.io/otel/trace v1.29.0 // indirect |
| 77 | - | golang.org/x/term v0.13.0 // indirect | 60 | + | golang.org/x/sync v0.8.0 // indirect |
| 78 | - | google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a // indirect | 61 | + | golang.org/x/term v0.23.0 // indirect |
| 79 | - | google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b // indirect | 62 | + | google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect |
| 80 | - | google.golang.org/grpc v1.59.0 // indirect | 63 | + | modernc.org/gc/v3 v3.0.0-20240801135723-a856999a2e4a // indirect |
| 81 | - | google.golang.org/protobuf v1.33.0 // indirect | 64 | + | modernc.org/libc v1.59.9 // indirect |
| 82 | - | lukechampine.com/uint128 v1.3.0 // indirect | |||
| 83 | - | modernc.org/cc/v3 v3.41.0 // indirect | |||
| 84 | - | modernc.org/ccgo/v3 v3.16.15 // indirect | |||
| 85 | - | modernc.org/libc v1.29.0 // indirect | |||
| 86 | modernc.org/mathutil v1.6.0 // indirect | 65 | modernc.org/mathutil v1.6.0 // indirect | ||
| 87 | - | modernc.org/memory v1.7.2 // indirect | 66 | + | modernc.org/memory v1.8.0 // indirect |
| 88 | - | modernc.org/opt v0.1.3 // indirect | |||
| 89 | modernc.org/strutil v1.2.0 // indirect | 67 | modernc.org/strutil v1.2.0 // indirect | ||
| 90 | modernc.org/token v1.1.0 // indirect | 68 | modernc.org/token v1.1.0 // indirect | ||
| 91 | ) | 69 | ) | ||
| 92 | 70 | ||||
| 93 | require ( | 71 | require ( | ||
| 94 | - | github.com/Microsoft/go-winio v0.6.1 // indirect | 72 | + | github.com/Microsoft/go-winio v0.6.2 // indirect |
| 95 | - | github.com/andybalholm/cascadia v1.3.1 // indirect | 73 | + | github.com/andybalholm/cascadia v1.3.2 // indirect |
| 96 | github.com/aymerick/douceur v0.2.0 // indirect | 74 | github.com/aymerick/douceur v0.2.0 // indirect | ||
| 97 | - | github.com/docker/distribution v2.8.2+incompatible // indirect | |||
| 98 | github.com/docker/go-units v0.5.0 // indirect | 75 | github.com/docker/go-units v0.5.0 // indirect | ||
| 99 | github.com/gogo/protobuf v1.3.2 // indirect | 76 | github.com/gogo/protobuf v1.3.2 // indirect | ||
| 100 | github.com/golang-jwt/jwt v3.2.2+incompatible // indirect | 77 | github.com/golang-jwt/jwt v3.2.2+incompatible // indirect | ||
| 101 | - | github.com/google/uuid v1.4.0 // direct | 78 | + | github.com/google/uuid v1.6.0 // direct |
| 102 | - | github.com/gorilla/context v1.1.1 // indirect | 79 | + | github.com/gorilla/context v1.1.2 // indirect |
| 103 | - | github.com/gorilla/css v1.0.0 // indirect | 80 | + | github.com/gorilla/css v1.0.1 // indirect |
| 104 | - | github.com/gorilla/securecookie v1.1.1 // indirect | 81 | + | github.com/gorilla/securecookie v1.1.2 // indirect |
| 105 | - | github.com/labstack/gommon v0.4.0 // indirect | 82 | + | github.com/labstack/gommon v0.4.2 // indirect |
| 106 | github.com/mattn/go-colorable v0.1.13 // indirect | 83 | github.com/mattn/go-colorable v0.1.13 // indirect | ||
| 107 | github.com/mattn/go-isatty v0.0.20 // indirect | 84 | github.com/mattn/go-isatty v0.0.20 // indirect | ||
| 108 | github.com/moby/term v0.5.0 // indirect | 85 | github.com/moby/term v0.5.0 // indirect | ||
| 109 | github.com/morikuni/aec v1.0.0 // indirect | 86 | github.com/morikuni/aec v1.0.0 // indirect | ||
| 110 | github.com/opencontainers/go-digest v1.0.0 // indirect | 87 | github.com/opencontainers/go-digest v1.0.0 // indirect | ||
| 111 | - | github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect | 88 | + | github.com/opencontainers/image-spec v1.1.0 // indirect |
| 112 | github.com/pkg/errors v0.9.1 // indirect | 89 | github.com/pkg/errors v0.9.1 // indirect | ||
| 113 | github.com/rogpeppe/go-internal v1.11.0 // indirect | 90 | github.com/rogpeppe/go-internal v1.11.0 // indirect | ||
| 114 | github.com/valyala/bytebufferpool v1.0.0 // indirect | 91 | github.com/valyala/bytebufferpool v1.0.0 // indirect | ||
| 115 | github.com/valyala/fasttemplate v1.2.2 // indirect | 92 | github.com/valyala/fasttemplate v1.2.2 // indirect | ||
| 116 | - | golang.org/x/crypto v0.14.0 // indirect | 93 | + | golang.org/x/crypto v0.26.0 // indirect |
| 117 | - | golang.org/x/mod v0.13.0 // indirect | 94 | + | golang.org/x/net v0.28.0 // indirect |
| 118 | - | golang.org/x/net v0.17.0 // indirect | 95 | + | golang.org/x/sys v0.24.0 // indirect |
| 119 | - | golang.org/x/sys v0.13.0 // indirect | 96 | + | golang.org/x/text v0.17.0 // indirect |
| 120 | - | golang.org/x/text v0.13.0 // indirect | 97 | + | golang.org/x/time v0.6.0 // indirect |
| 121 | - | golang.org/x/time v0.3.0 // indirect | 98 | + | golang.org/x/tools v0.24.0 // indirect |
| 122 | - | golang.org/x/tools v0.14.0 // indirect | |||
| 123 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect | 99 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect | ||
| 124 | gotest.tools/v3 v3.5.0 // indirect | 100 | gotest.tools/v3 v3.5.0 // indirect | ||
| 125 | ) | 101 | ) | ||
M go.sum +152 -260 generated file: collapsed
M golangci.yml +1 -2
| @@ -1,5 +1,5 @@ | |||
| 1 | 1 | run: | |
| 2 | - | go: 1.21 | |
| 2 | + | go: 1.23 | |
| 3 | 3 | concurrency: 4 | |
| 4 | 4 | timeout: 10m | |
| 5 | 5 | ||
| @@ -25,4 +25,3 @@ linters: | |||
| 25 | 25 | - unconvert | |
| 26 | 26 | - unused | |
| 27 | 27 | - whitespace | |
| 28 | - | ||
| @@ -1,5 +1,5 @@ | |||||
| 1 | run: | 1 | run: | ||
| 2 | - | go: 1.21 | 2 | + | go: 1.23 |
| 3 | concurrency: 4 | 3 | concurrency: 4 | ||
| 4 | timeout: 10m | 4 | timeout: 10m | ||
| 5 | 5 | ||||
| @@ -25,4 +25,3 @@ linters: | |||||
| 25 | - unconvert | 25 | - unconvert | ||
| 26 | - unused | 26 | - unused | ||
| 27 | - whitespace | 27 | - whitespace | ||
| 28 | - | ||||
M internal/httpserve/handler/containers.go +2 -2
| @@ -50,7 +50,7 @@ func safelyInteractWithIDMap(op MapOperation, key string, value ...string) (stri | |||
| 50 | 50 | } | |
| 51 | 51 | ||
| 52 | 52 | type HumanReadableContainerImage struct { | |
| 53 | - | *types.ImageSummary | |
| 53 | + | *types.ImageInspect | |
| 54 | 54 | Name string | |
| 55 | 55 | ShortID string | |
| 56 | 56 | CreatedStr string | |
| @@ -110,7 +110,7 @@ func ImageManagerComponent(c echo.Context, a *server.App) error { | |||
| 110 | 110 | sizeStr := humanize.BytesToReadableSize(image.Size) | |
| 111 | 111 | for _, repoTag := range image.RepoTags { | |
| 112 | 112 | humanReadableImages = append(humanReadableImages, HumanReadableContainerImage{ | |
| 113 | - | ImageSummary: &types.ImageSummary{ | |
| 113 | + | ImageInspect: &types.ImageInspect{ | |
| 114 | 114 | ID: ShortID, // Set the ID to the ShortID | |
| 115 | 115 | }, | |
| 116 | 116 | CreatedStr: createdStr, | |
| @@ -50,7 +50,7 @@ func safelyInteractWithIDMap(op MapOperation, key string, value ...string) (stri | |||||
| 50 | } | 50 | } | ||
| 51 | 51 | ||||
| 52 | type HumanReadableContainerImage struct { | 52 | type HumanReadableContainerImage struct { | ||
| 53 | - | *types.ImageSummary | 53 | + | *types.ImageInspect |
| 54 | Name string | 54 | Name string | ||
| 55 | ShortID string | 55 | ShortID string | ||
| 56 | CreatedStr string | 56 | CreatedStr string | ||
| @@ -110,7 +110,7 @@ func ImageManagerComponent(c echo.Context, a *server.App) error { | |||||
| 110 | sizeStr := humanize.BytesToReadableSize(image.Size) | 110 | sizeStr := humanize.BytesToReadableSize(image.Size) | ||
| 111 | for _, repoTag := range image.RepoTags { | 111 | for _, repoTag := range image.RepoTags { | ||
| 112 | humanReadableImages = append(humanReadableImages, HumanReadableContainerImage{ | 112 | humanReadableImages = append(humanReadableImages, HumanReadableContainerImage{ | ||
| 113 | - | ImageSummary: &types.ImageSummary{ | 113 | + | ImageInspect: &types.ImageInspect{ |
| 114 | ID: ShortID, // Set the ID to the ShortID | 114 | ID: ShortID, // Set the ID to the ShortID | ||
| 115 | }, | 115 | }, | ||
| 116 | CreatedStr: createdStr, | 116 | CreatedStr: createdStr, | ||
M pkg/docker/client.go +2 -2
| @@ -7,7 +7,7 @@ import ( | |||
| 7 | 7 | "os" | |
| 8 | 8 | "time" | |
| 9 | 9 | ||
| 10 | - | "github.com/docker/docker/api/types" | |
| 10 | + | "github.com/docker/docker/api/types/container" | |
| 11 | 11 | "github.com/docker/docker/client" | |
| 12 | 12 | ) | |
| 13 | 13 | ||
| @@ -74,7 +74,7 @@ func CheckIfInitialized() error { | |||
| 74 | 74 | defer cancel() | |
| 75 | 75 | ||
| 76 | 76 | // More stringent check: try to list containers | |
| 77 | - | _, err := dockerCli.ContainerList(ctx, types.ContainerListOptions{}) | |
| 77 | + | _, err := dockerCli.ContainerList(ctx, container.ListOptions{}) | |
| 78 | 78 | if err != nil { | |
| 79 | 79 | return fmt.Errorf("cannot connect to Docker daemon: %s", err) | |
| 80 | 80 | } | |
| @@ -7,7 +7,7 @@ import ( | |||||
| 7 | "os" | 7 | "os" | ||
| 8 | "time" | 8 | "time" | ||
| 9 | 9 | ||||
| 10 | - | "github.com/docker/docker/api/types" | 10 | + | "github.com/docker/docker/api/types/container" |
| 11 | "github.com/docker/docker/client" | 11 | "github.com/docker/docker/client" | ||
| 12 | ) | 12 | ) | ||
| 13 | 13 | ||||
| @@ -74,7 +74,7 @@ func CheckIfInitialized() error { | |||||
| 74 | defer cancel() | 74 | defer cancel() | ||
| 75 | 75 | ||||
| 76 | // More stringent check: try to list containers | 76 | // More stringent check: try to list containers | ||
| 77 | - | _, err := dockerCli.ContainerList(ctx, types.ContainerListOptions{}) | 77 | + | _, err := dockerCli.ContainerList(ctx, container.ListOptions{}) |
| 78 | if err != nil { | 78 | if err != nil { | ||
| 79 | return fmt.Errorf("cannot connect to Docker daemon: %s", err) | 79 | return fmt.Errorf("cannot connect to Docker daemon: %s", err) | ||
| 80 | } | 80 | } | ||
M pkg/docker/containers.go +7 -7
| @@ -93,7 +93,7 @@ func ListRunningContainers() ([]types.Container, error) { | |||
| 93 | 93 | return nil, err | |
| 94 | 94 | } | |
| 95 | 95 | // List containers using the Docker client: | |
| 96 | - | containers, err := dockerCli.ContainerList(context.Background(), types.ContainerListOptions{All: true}) | |
| 96 | + | containers, err := dockerCli.ContainerList(context.Background(), container.ListOptions{All: true}) | |
| 97 | 97 | if err != nil { | |
| 98 | 98 | return nil, err | |
| 99 | 99 | } | |
| @@ -167,7 +167,7 @@ func RenameContainer(containerID string, newName string) error { | |||
| 167 | 167 | ||
| 168 | 168 | // RemoveContainer | |
| 169 | 169 | func RemoveContainer(containerID string) error { | |
| 170 | - | err := dockerCli.ContainerRemove(context.Background(), containerID, types.ContainerRemoveOptions{}) | |
| 170 | + | err := dockerCli.ContainerRemove(context.Background(), containerID, container.RemoveOptions{Force: true}) | |
| 171 | 171 | if err != nil { | |
| 172 | 172 | return err | |
| 173 | 173 | } | |
| @@ -189,7 +189,7 @@ func StartContainer(containerID string) error { | |||
| 189 | 189 | } | |
| 190 | 190 | ||
| 191 | 191 | // Start container using the Docker client | |
| 192 | - | err = dockerCli.ContainerStart(context.Background(), containerID, types.ContainerStartOptions{}) | |
| 192 | + | err = dockerCli.ContainerStart(context.Background(), containerID, container.StartOptions{}) | |
| 193 | 193 | if err != nil { | |
| 194 | 194 | return fmt.Errorf("could not start container: %v", err) | |
| 195 | 195 | } | |
| @@ -260,7 +260,7 @@ func CreateContainer(cmdParams ContainerCommandParams) (string, error) { | |||
| 260 | 260 | PortBindings: portBindings, | |
| 261 | 261 | Binds: cmdParams.Volumes, | |
| 262 | 262 | RestartPolicy: container.RestartPolicy{ | |
| 263 | - | Name: cmdParams.Restart, | |
| 263 | + | Name: "always", | |
| 264 | 264 | }, | |
| 265 | 265 | }, | |
| 266 | 266 | &network.NetworkingConfig{ | |
| @@ -325,7 +325,7 @@ func UpdateContainerConfig(containerID string, newConfig *container.Config, newH | |||
| 325 | 325 | } | |
| 326 | 326 | ||
| 327 | 327 | // 2. Remove the old container | |
| 328 | - | if err := dockerCli.ContainerRemove(ctx, containerID, types.ContainerRemoveOptions{}); err != nil { | |
| 328 | + | if err := dockerCli.ContainerRemove(ctx, containerID, container.RemoveOptions{}); err != nil { | |
| 329 | 329 | return err | |
| 330 | 330 | } | |
| 331 | 331 | ||
| @@ -343,7 +343,7 @@ func UpdateContainerConfig(containerID string, newConfig *container.Config, newH | |||
| 343 | 343 | } | |
| 344 | 344 | ||
| 345 | 345 | // 4. Start the new container | |
| 346 | - | if err := dockerCli.ContainerStart(ctx, resp.ID, types.ContainerStartOptions{}); err != nil { | |
| 346 | + | if err := dockerCli.ContainerStart(ctx, resp.ID, container.StartOptions{}); err != nil { | |
| 347 | 347 | return err | |
| 348 | 348 | } | |
| 349 | 349 | ||
| @@ -353,7 +353,7 @@ func UpdateContainerConfig(containerID string, newConfig *container.Config, newH | |||
| 353 | 353 | // GetContainerLogs returns the logs of a container | |
| 354 | 354 | func GetContainerLogs(containerID string) (string, error) { | |
| 355 | 355 | // Get container logs using the Docker client | |
| 356 | - | containerLogs, err := dockerCli.ContainerLogs(context.Background(), containerID, types.ContainerLogsOptions{ShowStdout: true, ShowStderr: true}) | |
| 356 | + | containerLogs, err := dockerCli.ContainerLogs(context.Background(), containerID, container.LogsOptions{ShowStdout: true, ShowStderr: true}) | |
| 357 | 357 | if err != nil { | |
| 358 | 358 | return "", err | |
| 359 | 359 | } | |
| @@ -93,7 +93,7 @@ func ListRunningContainers() ([]types.Container, error) { | |||||
| 93 | return nil, err | 93 | return nil, err | ||
| 94 | } | 94 | } | ||
| 95 | // List containers using the Docker client: | 95 | // List containers using the Docker client: | ||
| 96 | - | containers, err := dockerCli.ContainerList(context.Background(), types.ContainerListOptions{All: true}) | 96 | + | containers, err := dockerCli.ContainerList(context.Background(), container.ListOptions{All: true}) |
| 97 | if err != nil { | 97 | if err != nil { | ||
| 98 | return nil, err | 98 | return nil, err | ||
| 99 | } | 99 | } | ||
| @@ -167,7 +167,7 @@ func RenameContainer(containerID string, newName string) error { | |||||
| 167 | 167 | ||||
| 168 | // RemoveContainer | 168 | // RemoveContainer | ||
| 169 | func RemoveContainer(containerID string) error { | 169 | func RemoveContainer(containerID string) error { | ||
| 170 | - | err := dockerCli.ContainerRemove(context.Background(), containerID, types.ContainerRemoveOptions{}) | 170 | + | err := dockerCli.ContainerRemove(context.Background(), containerID, container.RemoveOptions{Force: true}) |
| 171 | if err != nil { | 171 | if err != nil { | ||
| 172 | return err | 172 | return err | ||
| 173 | } | 173 | } | ||
| @@ -189,7 +189,7 @@ func StartContainer(containerID string) error { | |||||
| 189 | } | 189 | } | ||
| 190 | 190 | ||||
| 191 | // Start container using the Docker client | 191 | // Start container using the Docker client | ||
| 192 | - | err = dockerCli.ContainerStart(context.Background(), containerID, types.ContainerStartOptions{}) | 192 | + | err = dockerCli.ContainerStart(context.Background(), containerID, container.StartOptions{}) |
| 193 | if err != nil { | 193 | if err != nil { | ||
| 194 | return fmt.Errorf("could not start container: %v", err) | 194 | return fmt.Errorf("could not start container: %v", err) | ||
| 195 | } | 195 | } | ||
| @@ -260,7 +260,7 @@ func CreateContainer(cmdParams ContainerCommandParams) (string, error) { | |||||
| 260 | PortBindings: portBindings, | 260 | PortBindings: portBindings, | ||
| 261 | Binds: cmdParams.Volumes, | 261 | Binds: cmdParams.Volumes, | ||
| 262 | RestartPolicy: container.RestartPolicy{ | 262 | RestartPolicy: container.RestartPolicy{ | ||
| 263 | - | Name: cmdParams.Restart, | 263 | + | Name: "always", |
| 264 | }, | 264 | }, | ||
| 265 | }, | 265 | }, | ||
| 266 | &network.NetworkingConfig{ | 266 | &network.NetworkingConfig{ | ||
| @@ -325,7 +325,7 @@ func UpdateContainerConfig(containerID string, newConfig *container.Config, newH | |||||
| 325 | } | 325 | } | ||
| 326 | 326 | ||||
| 327 | // 2. Remove the old container | 327 | // 2. Remove the old container | ||
| 328 | - | if err := dockerCli.ContainerRemove(ctx, containerID, types.ContainerRemoveOptions{}); err != nil { | 328 | + | if err := dockerCli.ContainerRemove(ctx, containerID, container.RemoveOptions{}); err != nil { |
| 329 | return err | 329 | return err | ||
| 330 | } | 330 | } | ||
| 331 | 331 | ||||
| @@ -343,7 +343,7 @@ func UpdateContainerConfig(containerID string, newConfig *container.Config, newH | |||||
| 343 | } | 343 | } | ||
| 344 | 344 | ||||
| 345 | // 4. Start the new container | 345 | // 4. Start the new container | ||
| 346 | - | if err := dockerCli.ContainerStart(ctx, resp.ID, types.ContainerStartOptions{}); err != nil { | 346 | + | if err := dockerCli.ContainerStart(ctx, resp.ID, container.StartOptions{}); err != nil { |
| 347 | return err | 347 | return err | ||
| 348 | } | 348 | } | ||
| 349 | 349 | ||||
| @@ -353,7 +353,7 @@ func UpdateContainerConfig(containerID string, newConfig *container.Config, newH | |||||
| 353 | // GetContainerLogs returns the logs of a container | 353 | // GetContainerLogs returns the logs of a container | ||
| 354 | func GetContainerLogs(containerID string) (string, error) { | 354 | func GetContainerLogs(containerID string) (string, error) { | ||
| 355 | // Get container logs using the Docker client | 355 | // Get container logs using the Docker client | ||
| 356 | - | containerLogs, err := dockerCli.ContainerLogs(context.Background(), containerID, types.ContainerLogsOptions{ShowStdout: true, ShowStderr: true}) | 356 | + | containerLogs, err := dockerCli.ContainerLogs(context.Background(), containerID, container.LogsOptions{ShowStdout: true, ShowStderr: true}) |
| 357 | if err != nil { | 357 | if err != nil { | ||
| 358 | return "", err | 358 | return "", err | ||
| 359 | } | 359 | } | ||
M pkg/docker/images.go +7 -6
| @@ -7,14 +7,15 @@ import ( | |||
| 7 | 7 | "os" | |
| 8 | 8 | ||
| 9 | 9 | "github.com/docker/docker/api/types" | |
| 10 | + | "github.com/docker/docker/api/types/image" | |
| 10 | 11 | ) | |
| 11 | 12 | ||
| 12 | - | func ListContainerImages() ([]types.ImageSummary, error) { | |
| 13 | + | func ListContainerImages() ([]image.Summary, error) { | |
| 13 | 14 | // Check if the Docker client has been initialized | |
| 14 | 15 | CheckIfInitialized() | |
| 15 | 16 | ||
| 16 | 17 | // List images using the Docker client | |
| 17 | - | images, err := dockerCli.ImageList(context.Background(), types.ImageListOptions{}) | |
| 18 | + | images, err := dockerCli.ImageList(context.Background(), image.ListOptions{}) | |
| 18 | 19 | if err != nil { | |
| 19 | 20 | return nil, err | |
| 20 | 21 | } | |
| @@ -24,7 +25,7 @@ func ListContainerImages() ([]types.ImageSummary, error) { | |||
| 24 | 25 | ||
| 25 | 26 | // DeleteContainerImage deletes an image from the Docker engine | |
| 26 | 27 | func DeleteContainerImage(imageID string) error { | |
| 27 | - | _, err := dockerCli.ImageRemove(context.Background(), imageID, types.ImageRemoveOptions{}) | |
| 28 | + | _, err := dockerCli.ImageRemove(context.Background(), imageID, image.RemoveOptions{}) | |
| 28 | 29 | if err != nil { | |
| 29 | 30 | return err | |
| 30 | 31 | } | |
| @@ -45,7 +46,7 @@ func CheckIfImageExists(imageID string) (bool, error) { | |||
| 45 | 46 | ||
| 46 | 47 | func GetImageIDByName(imageName string) (string, error) { | |
| 47 | 48 | ||
| 48 | - | images, err := dockerCli.ImageList(context.Background(), types.ImageListOptions{}) | |
| 49 | + | images, err := dockerCli.ImageList(context.Background(), image.ListOptions{}) | |
| 49 | 50 | if err != nil { | |
| 50 | 51 | return "", fmt.Errorf("failed to list images: %w", err) | |
| 51 | 52 | } | |
| @@ -191,9 +192,9 @@ func GetImageSizeFromReader(imageID string) (int64, error) { | |||
| 191 | 192 | } | |
| 192 | 193 | ||
| 193 | 194 | // list all images | |
| 194 | - | func GetAllImages() ([]types.ImageSummary, error) { | |
| 195 | + | func GetAllImages() ([]image.Summary, error) { | |
| 195 | 196 | // List images using the Docker client | |
| 196 | - | images, err := dockerCli.ImageList(context.Background(), types.ImageListOptions{}) | |
| 197 | + | images, err := dockerCli.ImageList(context.Background(), image.ListOptions{}) | |
| 197 | 198 | if err != nil { | |
| 198 | 199 | return nil, err | |
| 199 | 200 | } | |
| @@ -7,14 +7,15 @@ import ( | |||||
| 7 | "os" | 7 | "os" | ||
| 8 | 8 | ||||
| 9 | "github.com/docker/docker/api/types" | 9 | "github.com/docker/docker/api/types" | ||
| 10 | + | "github.com/docker/docker/api/types/image" | |||
| 10 | ) | 11 | ) | ||
| 11 | 12 | ||||
| 12 | - | func ListContainerImages() ([]types.ImageSummary, error) { | 13 | + | func ListContainerImages() ([]image.Summary, error) { |
| 13 | // Check if the Docker client has been initialized | 14 | // Check if the Docker client has been initialized | ||
| 14 | CheckIfInitialized() | 15 | CheckIfInitialized() | ||
| 15 | 16 | ||||
| 16 | // List images using the Docker client | 17 | // List images using the Docker client | ||
| 17 | - | images, err := dockerCli.ImageList(context.Background(), types.ImageListOptions{}) | 18 | + | images, err := dockerCli.ImageList(context.Background(), image.ListOptions{}) |
| 18 | if err != nil { | 19 | if err != nil { | ||
| 19 | return nil, err | 20 | return nil, err | ||
| 20 | } | 21 | } | ||
| @@ -24,7 +25,7 @@ func ListContainerImages() ([]types.ImageSummary, error) { | |||||
| 24 | 25 | ||||
| 25 | // DeleteContainerImage deletes an image from the Docker engine | 26 | // DeleteContainerImage deletes an image from the Docker engine | ||
| 26 | func DeleteContainerImage(imageID string) error { | 27 | func DeleteContainerImage(imageID string) error { | ||
| 27 | - | _, err := dockerCli.ImageRemove(context.Background(), imageID, types.ImageRemoveOptions{}) | 28 | + | _, err := dockerCli.ImageRemove(context.Background(), imageID, image.RemoveOptions{}) |
| 28 | if err != nil { | 29 | if err != nil { | ||
| 29 | return err | 30 | return err | ||
| 30 | } | 31 | } | ||
| @@ -45,7 +46,7 @@ func CheckIfImageExists(imageID string) (bool, error) { | |||||
| 45 | 46 | ||||
| 46 | func GetImageIDByName(imageName string) (string, error) { | 47 | func GetImageIDByName(imageName string) (string, error) { | ||
| 47 | 48 | ||||
| 48 | - | images, err := dockerCli.ImageList(context.Background(), types.ImageListOptions{}) | 49 | + | images, err := dockerCli.ImageList(context.Background(), image.ListOptions{}) |
| 49 | if err != nil { | 50 | if err != nil { | ||
| 50 | return "", fmt.Errorf("failed to list images: %w", err) | 51 | return "", fmt.Errorf("failed to list images: %w", err) | ||
| 51 | } | 52 | } | ||
| @@ -191,9 +192,9 @@ func GetImageSizeFromReader(imageID string) (int64, error) { | |||||
| 191 | } | 192 | } | ||
| 192 | 193 | ||||
| 193 | // list all images | 194 | // list all images | ||
| 194 | - | func GetAllImages() ([]types.ImageSummary, error) { | 195 | + | func GetAllImages() ([]image.Summary, error) { |
| 195 | // List images using the Docker client | 196 | // List images using the Docker client | ||
| 196 | - | images, err := dockerCli.ImageList(context.Background(), types.ImageListOptions{}) | 197 | + | images, err := dockerCli.ImageList(context.Background(), image.ListOptions{}) |
| 197 | if err != nil { | 198 | if err != nil { | ||
| 198 | return nil, err | 199 | return nil, err | ||
| 199 | } | 200 | } | ||