github.com/docker/docker 265f70964794_2Bincompatible
AArch64 (ARM64) architecture stringBacktick shell command-substitution syntax
SHA-25639c9243121b6665197a0c8d7e9bf957e34bba7d6fc09cbacfd3c887b22ca0b22
Evidence
1package container
2
3import (
4 "compress/flate"
5 "compress/gzip"
6 "context"
7 "encoding/base64"
8 "encoding/json"
9 "io"
10 "net/http"
11
12 "github.com/docker/docker/api/server/httputils"
13 "github.com/docker/docker/api/types/container"
14 gddohttputil "github.com/golang/gddo/httputil"
15)
16
17// setContainerPathStatHeader encodes the stat to JSON, base64 encode, and place in a header.
18func setContainerPathStatHeader(stat *container.PathStat, header http.Header) error {
19 statJSON, err := json.Marshal(stat)
20 if err != nil {
21 return err
22 }
23
24 header.Set(
25 "X-Docker-Container-Path-Stat",
26 base64.StdEncoding.EncodeToString(statJSON),
27 )
28
⋯4 lines
48:39… ncoding(r, []string{"gzip", "deflate"}) {
49 case "gzip":
50 gw := gzip.NewWriter(w)
51 defer gw.Close()
52 cw = gw
53 w.Header().Set("Content-Encoding", "gzip")
54 case "deflate":
55 fw, err := flate.NewWriter(w, fl …
61:18… "Content-Encoding", "deflate")
62 default:
63 cw = w
64 }
65 _, err := io.Copy(cw, body)
66 return err
67}
68
69func (c *containerRouter) getContainersArchive(ctx context.Context, w http.ResponseWriter, r *http.Req …
1package container
2
3import (
4 "time"
5
6 "github.com/docker/docker/api/types/strslice"
7 "github.com/docker/go-connections/nat"
8 dockerspec "github.com/moby/docker-image-spec/specs-go/v1"
9)
10
11// MinimumDuration puts a minimum on user configured duration.
12// This is to prevent API error on time unit. For example, API may
13// set 3 as healthcheck interval with intention of 3 seconds, but
14// Docker interprets it as 3 nanoseconds.
15const MinimumDuration = 1 * time.Millisecond
16
17// StopOptions holds the options to stop or restart a container.
18type StopOptions struct {
19 // Signal (optional) is the signal to send to the container to (gracefully)
20 // stop it before forcibly te …
1#!/bin/sh
2# dockerd-rootless-setuptool.sh: setup tool for dockerd-rootless.sh
3# Needs to be executed as a non-root user.
4#
5# Typical usage: dockerd-rootless-setuptool.sh install --force
6#
7# Documentation: https://docs.docker.com/go/rootless/
8set -eu
9
10# utility functions
11INFO() {
12 /bin/echo -e "\e[104m\e[97m[INFO]\e[49m\e[39m $@"
13}
14
⋯6 lines
Showing the top 5 files — 1 more file (19 regions) not shown.