Skip to content

Docker CLI - August Mirror #3

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

Merged
merged 57 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
e29292f
add security policy
thaJeztah Aug 5, 2024
73e78a5
run: fix GetList return empty issue for throttledevice
jongwu Aug 7, 2024
434d8b7
update to go1.21.13
vvoland Aug 7, 2024
87c6624
Merge pull request #5324 from vvoland/update-go-1.21.13
thaJeztah Aug 7, 2024
9c44806
plugins: don't panic on Close if PluginServer nil
laurazard Aug 7, 2024
0052d2c
Merge pull request #5327 from laurazard/fix-panic-pluginserver
thaJeztah Aug 7, 2024
b8a53ee
vendor: github.com/docker/docker master (f3cf9359bdf6)
vvoland Aug 8, 2024
91b173e
Merge pull request #5316 from thaJeztah/add_security
vvoland Aug 8, 2024
7fc8802
Merge pull request #5330 from vvoland/vendor-docker-master
thaJeztah Aug 8, 2024
6440816
vendor: github.com/docker/docker 2269acc7a31d (master, v-next)
thaJeztah Aug 8, 2024
c537fb9
Merge pull request #5332 from thaJeztah/bump_engine
vvoland Aug 9, 2024
78a8fba
docs: fix link to http proxy document
dvdksn Aug 9, 2024
fc3e949
Merge pull request #5338 from dvdksn/fix-proxy-doclink
dvdksn Aug 9, 2024
471862b
Merge pull request #5323 from jongwu/fix_bps_limit
thaJeztah Aug 9, 2024
d4a362a
docs: update internal links after refactor
dvdksn Aug 11, 2024
211a540
Merge pull request #5342 from dvdksn/docs-update-internal-links
dvdksn Aug 12, 2024
f3c2c26
disable pseudoterminal creation
trajano Aug 6, 2024
1a7b7dd
Merge pull request #5320 from trajano/patch-1
thaJeztah Aug 12, 2024
0fd3fb0
cli/connhelper: getConnectionHelper: move ssh-option funcs out of clo…
thaJeztah Aug 12, 2024
35666cf
Merge pull request #5345 from thaJeztah/connhelper_cleanups
thaJeztah Aug 13, 2024
2dd4eb0
docs: update link to moved build context doc
dvdksn Aug 13, 2024
fcfdd7b
auth: add support for oauth device-code login
laurazard Jul 8, 2024
6e4818e
Refactor `cli/command/registry`
laurazard Jul 8, 2024
e662467
login: normalize `registry-1.docker.io`
laurazard Aug 1, 2024
5eb3275
filestore: don't print warning multiple times
laurazard Aug 5, 2024
c3fe7bc
fallback to regular login if oauth login fails to start
laurazard Aug 13, 2024
bbce5a0
Merge pull request #5344 from laurazard/auth-device-flow-pat
thaJeztah Aug 15, 2024
f1befab
docs: use gh alert syntax for callouts
dvdksn Aug 16, 2024
be11b74
image/list: Add `--tree` flag
vvoland Mar 28, 2024
ea8aafc
cli/tree: Add `Content size` column
vvoland Aug 14, 2024
18ab788
list/tree: Align number right, text left
vvoland Aug 16, 2024
b1a08f7
list/tree: Sort by created date
vvoland Aug 16, 2024
d417d06
list/tree: Add an experimental warning
vvoland Aug 16, 2024
0242a1e
list/tree: Capitalize column headers
vvoland Aug 16, 2024
a9b78da
list/tree: Add spacing before the content and first image
vvoland Aug 16, 2024
cab8a2e
Merge pull request #4982 from vvoland/c8d-multiplatform-list
laurazard Aug 16, 2024
6979ab0
list/tree: Fix some escape codes included in nonTTY
vvoland Aug 16, 2024
351249d
list/tree: Print <untagged> as dangling image name
vvoland Aug 16, 2024
8675f4c
Merge pull request #5352 from vvoland/c8d-multiplatform-list-2
vvoland Aug 16, 2024
7b91647
list/tree: No extra spacing for graphdriver
vvoland Aug 16, 2024
b06db58
Merge pull request #5356 from vvoland/list-tree-gd-spacing
laurazard Aug 19, 2024
0be9e2f
Merge pull request #5347 from dvdksn/update-build-context-link
dvdksn Aug 19, 2024
846ecf5
login: add oauth escape hatch
laurazard Aug 20, 2024
c974a83
chore: update link to docker engine api reference
dvdksn Aug 20, 2024
a327476
login: add e2e tests for oauth + escape hatch
laurazard Aug 20, 2024
986b077
Merge pull request #5361 from laurazard/add-oauth-login-escape-hatch
laurazard Aug 20, 2024
964155c
cli/formatter: bracket IPv6 addrs prepended to ports
akerouanton Aug 20, 2024
d47c36d
Merge pull request #5363 from akerouanton/fix-ps-pbs
thaJeztah Aug 20, 2024
35626ba
Merge pull request #5350 from dvdksn/docs-alerts-syntax
dvdksn Aug 21, 2024
436080b
Merge pull request #5360 from dvdksn/update-apireference-link
dvdksn Aug 22, 2024
cc1d7b7
cli/command/system: remove redundant nil-check (gosimple)
thaJeztah Aug 26, 2024
f101f07
cli/command: fix n-constant format string in call (govet)
thaJeztah Aug 26, 2024
9c87891
e2e/global: fix n-constant format string in call (govet)
thaJeztah Aug 26, 2024
c4a55df
cli: rename args that collided with builtins (predeclard)
thaJeztah Aug 26, 2024
3826f5a
Merge pull request #5370 from thaJeztah/fix_linting_issues
vvoland Aug 26, 2024
dab9674
Revert "login: normalize `registry-1.docker.io`"
laurazard Aug 29, 2024
6273e65
Merge pull request #5379 from laurazard/dont-normalize-registry-1
thaJeztah Aug 29, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21.12
go-version: 1.21.13
-
name: Test
run: |
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG BASE_VARIANT=alpine
ARG ALPINE_VERSION=3.20
ARG BASE_DEBIAN_DISTRO=bookworm

ARG GO_VERSION=1.21.12
ARG GO_VERSION=1.21.13
ARG XX_VERSION=1.4.0
ARG GOVERSIONINFO_VERSION=v1.3.0
ARG GOTESTSUM_VERSION=v1.10.0
Expand Down
44 changes: 44 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Security Policy

The maintainers of the Docker CLI take security seriously. If you discover
a security issue, please bring it to their attention right away!

## Reporting a Vulnerability

Please **DO NOT** file a public issue, instead send your report privately
to [[email protected]](mailto:[email protected]).

Reporter(s) can expect a response within 72 hours, acknowledging the issue was
received.

## Review Process

After receiving the report, an initial triage and technical analysis is
performed to confirm the report and determine its scope. We may request
additional information in this stage of the process.

Once a reviewer has confirmed the relevance of the report, a draft security
advisory will be created on GitHub. The draft advisory will be used to discuss
the issue with maintainers, the reporter(s), and where applicable, other
affected parties under embargo.

If the vulnerability is accepted, a timeline for developing a patch, public
disclosure, and patch release will be determined. If there is an embargo period
on public disclosure before the patch release, the reporter(s) are expected to
participate in the discussion of the timeline and abide by agreed upon dates
for public disclosure.

## Accreditation

Security reports are greatly appreciated and we will publicly thank you,
although we will keep your name confidential if you request it. We also like to
send gifts - if you're into swag, make sure to let us know. We do not currently
offer a paid security bounty program at this time.

## Supported Versions

This project uses long-lived branches to maintain releases, and follows
the maintenance cycle of the Moby project.
Refer to [BRANCHES-AND-TAGS.md](https://github.com/moby/moby/blob/master/project/BRANCHES-AND-TAGS.md)
in the default branch of the moby repository to learn about the current
maintenance status of each branch.
3 changes: 3 additions & 0 deletions cli-plugins/socket/socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ func (pl *PluginServer) Addr() net.Addr {
//
// The error value is that of the underlying [net.Listner.Close] call.
func (pl *PluginServer) Close() error {
if pl == nil {
return nil
}
logrus.Trace("Closing plugin server")
// Close connections first to ensure the connections get io.EOF instead
// of a connection reset.
Expand Down
12 changes: 12 additions & 0 deletions cli-plugins/socket/socket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,18 @@ func TestPluginServer(t *testing.T) {
assert.NilError(t, err, "failed to dial returned server")
checkDirNoNewPluginServer(t)
})

t.Run("does not panic on Close if server is nil", func(t *testing.T) {
var srv *PluginServer
defer func() {
if r := recover(); r != nil {
t.Errorf("panicked on Close")
}
}()

err := srv.Close()
assert.NilError(t, err)
})
}

func checkDirNoNewPluginServer(t *testing.T) {
Expand Down
4 changes: 3 additions & 1 deletion cli/command/formatter/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package formatter

import (
"fmt"
"net"
"sort"
"strconv"
"strings"
Expand Down Expand Up @@ -331,7 +332,8 @@ func DisplayablePorts(ports []container.Port) string {
portKey := port.Type
if port.IP != "" {
if port.PublicPort != current {
hostMappings = append(hostMappings, fmt.Sprintf("%s:%d->%d/%s", port.IP, port.PublicPort, port.PrivatePort, port.Type))
hAddrPort := net.JoinHostPort(port.IP, strconv.Itoa(int(port.PublicPort)))
hostMappings = append(hostMappings, fmt.Sprintf("%s->%d/%s", hAddrPort, port.PrivatePort, port.Type))
continue
}
portKey = port.IP + "/" + port.Type
Expand Down
10 changes: 10 additions & 0 deletions cli/command/formatter/container_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,16 @@ func TestDisplayablePorts(t *testing.T) {
},
expected: "0.0.0.0:0->9988/tcp",
},
{
ports: []container.Port{
{
IP: "::",
PrivatePort: 9988,
Type: "tcp",
},
},
expected: "[::]:0->9988/tcp",
},
{
ports: []container.Port{
{
Expand Down
26 changes: 26 additions & 0 deletions cli/command/image/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package image

import (
"context"
"errors"
"fmt"
"io"

Expand All @@ -24,6 +25,7 @@ type imagesOptions struct {
format string
filter opts.FilterOpt
calledAs string
tree bool
}

// NewImagesCommand creates a new `docker images` command
Expand Down Expand Up @@ -59,6 +61,10 @@ func NewImagesCommand(dockerCLI command.Cli) *cobra.Command {
flags.StringVar(&options.format, "format", "", flagsHelper.FormatHelp)
flags.VarP(&options.filter, "filter", "f", "Filter output based on conditions provided")

flags.BoolVar(&options.tree, "tree", false, "List multi-platform images as a tree (EXPERIMENTAL)")
flags.SetAnnotation("tree", "version", []string{"1.47"})
flags.SetAnnotation("tree", "experimentalCLI", nil)

return cmd
}

Expand All @@ -75,6 +81,26 @@ func runImages(ctx context.Context, dockerCLI command.Cli, options imagesOptions
filters.Add("reference", options.matchName)
}

if options.tree {
if options.quiet {
return errors.New("--quiet is not yet supported with --tree")
}
if options.noTrunc {
return errors.New("--no-trunc is not yet supported with --tree")
}
if options.showDigests {
return errors.New("--show-digest is not yet supported with --tree")
}
if options.format != "" {
return errors.New("--format is not yet supported with --tree")
}

return runTree(ctx, dockerCLI, treeOptions{
all: options.all,
filters: filters,
})
}

images, err := dockerCLI.Client().ImageList(ctx, image.ListOptions{
All: options.all,
Filters: filters,
Expand Down
Loading