Граф коммитов

51 Коммитов

Автор SHA1 Сообщение Дата
CrazyMax 37aa0a7cf4
add docker-buildx-plugin package (deb, rpm)
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-03-27 17:06:08 +02:00
Sebastiaan van Stijn d66f7a68c9
deb: add docker-compose-plugin package
Adds a deb package for the docker-compose cli plugin

with this:

    dpkg -i ./docker-ce-cli_0.0.0-20210629140245-4a6fe51-0~ubuntu-focal_amd64.deb
    dpkg -i ./docker-compose-plugin_2.3.1.3~ubuntu-focal_amd64.deb

    docker info --format '{{json .ClientInfo.Plugins}}' | jq .
    [
      {
        "SchemaVersion": "0.1.0",
        "Vendor": "Docker Inc.",
        "Version": "v0.5.1-docker",
        "ShortDescription": "Build with BuildKit",
        "Name": "buildx",
        "Path": "/usr/libexec/docker/cli-plugins/docker-buildx"
      },
      {
        "SchemaVersion": "0.1.0",
        "Vendor": "Docker Inc.",
        "Version": "v2.3.1",
        "ShortDescription": "Docker Compose",
        "Name": "compose",
        "Path": "/usr/libexec/docker/cli-plugins/docker-compose"
      }
    ]

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-08 12:08:20 +01:00
Sebastiaan van Stijn da818ea1ff
Makefile: add "distro-xxx" aliases for rpm and deb
This allows easier building without having to specify if an "rpm" or "deb"
needs to be built.

Before this patch:

    make -C rpm centos-8
    make -C deb ubuntu-focal

With this patch applied:

    make centos-8
    make ubuntu-focal

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-10-22 17:57:41 +02:00
Sebastiaan van Stijn f0302b8ab4
static: add option to specify containerd and runc version
This allows passing `CONTAINERD_VERSION` and `RUNC_VERSION` make vars
to override the default version in the upstream repository's Dockerfile.

With this, it's easier to make the static packages match the latest
released `containerd.io` deb/rpm (which are used by the .deb and .rpm
docker-ce packages), without having to modify the upstream moby repository.

Currently, this uses the DOCKER_BUILD_OPTS make variable, which is available
in the moby Makefile, but work is in progress to add `CONTAINERD_VERSION`
and `RUNC_VERSION` make variables in the upstream repository. Once those
changes are merged, we can update the makefile in this repository accordingly.

With this patch:

If `RUNC_VERSION` and `CONTAINERD_VERSION` are not passed, the defaults are used:

    $ make \
        DOCKER_BUILD_PKGS=static-linux \
        REF=v20.10.8 \
        VERSION=v20.10.8 \
        static

    $ docker run --rm -v $(pwd)/static/build/linux/docker/:/docker alpine sh -c '/docker/containerd --version && /docker/runc --version'
    containerd github.com/containerd/containerd v1.4.9 e25210fe30a0a703442421b0f60afac609f950a3
    runc version 1.0.1
    commit: v1.0.1-0-g4144b638
    spec: 1.0.2-dev
    go: go1.16.8
    libseccomp: 2.4.4

Passing the `RUNC_VERSION` and `CONTAINERD_VERSION` vars overrides the version
of containerd and runc:

    $ make \
        DOCKER_BUILD_PKGS=static-linux \
        REF=v20.10.8 \
        VERSION=v20.10.8 \
        RUNC_VERSION=v1.0.2 \
        CONTAINERD_VERSION=v1.4.10 \
        static

    $ docker run --rm -v $(pwd)/static/build/linux/docker/:/docker alpine sh -c '/docker/containerd --version && /docker/runc --version'
    containerd github.com/containerd/containerd v1.4.10 8848fdb7c4ae3815afcc990a8a99d663dda1b590
    runc version 1.0.2
    commit: v1.0.2-0-g52b36a2d
    spec: 1.0.2-dev
    go: go1.16.8
    libseccomp: 2.4.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-10-04 09:58:02 +02:00
Tibor Vass c04ab6da6a arm: do not rely on host arch, specify --platform and CGO_ENABLED
Since we are building arm on arm64 machines we have to specify the desired platform
and not rely on the host's architecture.

Also when building arm on arm64 machines, there can be issues with cgo.
So this patch makes sure CGO_ENABLED env var gets passed on as a build arg.

Signed-off-by: Tibor Vass <tibor@docker.com>
2021-04-09 19:44:54 +00:00
Sebastiaan van Stijn e0ba7d1752
rpm: build separate package for scan-plugin
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-01 01:10:25 +02:00
Sebastiaan van Stijn 7435ad6ba5
Add checkout.sh to handle tags with shallow clones
fetching a tag ref does not download the tag itself.
This patch makes sure that the tag (or branch) is downloaded otherwise
fallsback to fetching the commit hash as it did before.

Co-Authored-By: Tibor Vass <tibor@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-31 20:09:13 +02:00
Sebastiaan van Stijn 44eed5234a
Makefile: use shallow clone
Before this change:

    make clean
    time make checkout
    git clone -q "https://github.com/docker/cli.git" src/github.com/docker/cli
    git clone -q "https://github.com/docker/docker.git" src/github.com/docker/docker
           69.16 real        15.69 user         9.69 sys

After this change:

    make clean
    time make checkout
    ...
    From https://github.com/docker/docker
     * branch            HEAD       -> FETCH_HEAD
    git -C src/github.com/docker/docker checkout -q FETCH_HEAD
           14.73 real         1.35 user         2.37 sys

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-07-31 08:59:40 +02:00
Sebastiaan van Stijn ebe9dc7cf4
Add Makefile targets to checkout from source
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-28 16:12:26 +02:00
Sebastiaan van Stijn d2395a37a9
Makefile: chown engine dir during cleanup
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-01 14:39:23 +02:00
Sebastiaan van Stijn 3bcf897271
Makefile: lazily expand paths
This should prevent situations where the target directory
does not yet exist when make is called.

given the following makefile:

    DIRECT := $(realpath ./direct)
    LAZY = $(realpath ./lazy)

    clean:
            @rm -rf ./direct ./lazy

    source:
            @mkdir -p direct lazy

    build: source
            @echo DIRECT is $(DIRECT)
            @echo LAZY is $(LAZY)

Running the below, will show that only "LAZY" shows the
correct path:

    make clean && make build
    DIRECT is
    LAZY is /Users/sebastiaan/Projects/test/lazy

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-11 15:15:45 +01:00
Sebastiaan van Stijn 5b8545ff87
Remove image-based build (for docker engine activate)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-12-05 16:09:00 +01:00
Sebastiaan van Stijn 2929c9b1e8
Makefile: realpath engine-, cli-dir
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-15 00:22:07 +02:00
Sebastiaan van Stijn fe23576b64
Makefile: use include for common variables
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-14 23:48:38 +02:00
Sebastiaan van Stijn 3b8cc28c3f
Makefile: set STATIC_VERSION only if empty
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-14 23:27:03 +02:00
Sebastiaan van Stijn 9f5da37431
Bump golang 1.12.8 (CVE-2019-9512, CVE-2019-9514)
go1.12.8 (released 2019/08/13) includes security fixes to the net/http and net/url packages.
See the Go 1.12.8 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.12.8

- net/http: Denial of Service vulnerabilities in the HTTP/2 implementation
  net/http and golang.org/x/net/http2 servers that accept direct connections from untrusted
  clients could be remotely made to allocate an unlimited amount of memory, until the program
  crashes. Servers will now close connections if the send queue accumulates too many control
  messages.
  The issues are CVE-2019-9512 and CVE-2019-9514, and Go issue golang.org/issue/33606.
  Thanks to Jonathan Looney from Netflix for discovering and reporting these issues.
  This is also fixed in version v0.0.0-20190813141303-74dc4d7220e7 of golang.org/x/net/http2.
  net/url: parsing validation issue
- url.Parse would accept URLs with malformed hosts, such that the Host field could have arbitrary
  suffixes that would appear in neither Hostname() nor Port(), allowing authorization bypasses
  in certain applications. Note that URLs with invalid, not numeric ports will now return an error
  from url.Parse.
  The issue is CVE-2019-14809 and Go issue golang.org/issue/29098.
  Thanks to Julian Hector and Nikolai Krein from Cure53, and Adi Cohen (adico.me) for discovering
  and reporting this issue.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-14 03:13:24 +02:00
Sebastiaan van Stijn 01ba39e597
Bump Golang 1.12.6
go1.12.6 (released 2019/06/11) includes fixes to the compiler, the linker,
the go command, and the `crypto/x509`, `net/http`, and `os` packages. See
the Go 1.12.6 milestone on our issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.12.6

full diff: https://github.com/golang/go/compare/go1.12.5...go1.12.6

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-07-08 11:17:54 +02:00
Kir Kolyshkin 8ac858c666 Makefile: rely on targets in deb/rpm
Instead of dynamically getting list of distros to build for,
rely on the corresponding targets in sub-Makefiles. This also
ensures that deb/Makefile and rpm/Makefile will have up-to-date
list of distros included.

This also fixes the following bug:

> $ make deb
> for p in raspbian-stretch ubuntu-bionic ubuntu-disco ubuntu-xenial debbuild/ubuntu-disco ubuntu-cosmic debian-buster debian-stretch; do \
> ...

As you can see, `debbuild/ubuntu-disco` should not be included but it
is. Could be prevented by using `-maxdepth 1` argument to `find`.

While at it, amend the sub-Makefiles to print out the distro
that we build for.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-07-02 15:44:17 -07:00
Sebastiaan van Stijn 0abbdec692
Bump Go 1.12.5
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-05-27 23:15:25 +03:00
Andrew Hsu 7ee83da187 bump to go 1.12.4
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2019-04-18 00:13:48 +00:00
Sebastiaan van Stijn a86dd09775
Bump Golang 1.11.5 (CVE-2019-6486)
See the milestone for details;
https://github.com/golang/go/issues?q=milestone%3AGo1.11.5+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-23 23:57:21 +01:00
Sebastiaan van Stijn 517a30b48d
Bump Golang 1.11.3 (CVE-2018-16875)
go1.11.3 (released 2018/12/14)

- crypto/x509: CPU denial of service in chain validation golang/go#29233
- cmd/go: directory traversal in "go get" via curly braces in import paths golang/go#29231
- cmd/go: remote command execution during "go get -u" golang/go#29230

See the Go 1.11.3 milestone on the issue tracker for details:
https://github.com/golang/go/issues?q=milestone%3AGo1.11.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-12-14 23:47:32 +01:00
Eli Uriegas 010a8c218d bump to golang 1.10.6
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-12-13 23:47:15 +00:00
Andrew Hsu c658dc5459 bump golang to 1.10.5
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2018-12-03 21:52:49 +00:00
docker-unir[bot] 91ad211786
Merge pull request #175 from dhiltgen/platform_master
Merged with https://github.com/seemethere/unir
2018-10-04 18:18:38 +00:00
Sebastiaan van Stijn 11b4630f4c
Bump Go to 1.10.4
Includes fixes to the go command, linker, and the net/http, mime/multipart,
ld/macho, bytes, and strings packages. See the Go 1.10.4 milestone on the
issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.10.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-08-31 11:55:50 +02:00
Daniel Hiltgen ab58b7658b Add build date per upstream moby pattern
This adds a build date using the same pattern as upstream
https://github.com/moby/moby/blob/master/hack/make.sh#L69

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
(cherry picked from commit c443439189)
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2018-08-29 07:44:56 -07:00
Daniel Hiltgen e6005315fe Expose the platform string for community builds
This encodes the platform as "Docker Engine - Community"
for community engines

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
(cherry picked from commit 4d9fd7d17f)
Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
2018-08-29 07:44:50 -07:00
Daniel Hiltgen 140dd86708 Set up default product license for community engines
This will report a fixed string for community engines
2018-08-20 16:41:23 -07:00
Jose Bigio 507c9f84cc Fix static version variable
Signed-off-by: Jose Bigio <jose.bigio@docker.com>
2018-08-10 13:12:48 -07:00
Jose Bigio 9bb08342ef Add top level make target
Signed-off-by: Jose Bigio <jose.bigio@docker.com>
2018-08-07 14:28:11 -07:00
Jose Bigio 16e6737bf2 Don't delete the engine when cleaning
Signed-off-by: Jose Bigio <jose.bigio@docker.com>
2018-08-07 10:22:58 -07:00
Jose Bigio 2dfaf0dd0f Build docker image with engine binary on multiple arches
Signed-off-by: Jose Bigio <jose.bigio@docker.com>
2018-08-03 16:32:19 -07:00
Daniel Hiltgen 27766ed0f4 Add support for image build
This adds a new packaging variant for engine with an image
2018-07-12 10:41:52 -07:00
Sebastiaan van Stijn 65fc4f1c0c
Bump Golang to 1.10.3
go1.10.3 (released 2018/06/05) includes fixes to the go command, and the
crypto/tls, crypto/x509, and strings packages. In particular, it adds minimal
support to the go command for the vgo transition. See the Go 1.10.3 milestone
on our issue tracker for details;
https://github.com/golang/go/issues?q=milestone%3AGo1.10.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-06-11 10:35:39 -07:00
corbin-coleman 0fe7417462 Set GO_VERSION with a build arg
Use a variable in the Makefile to set the GO_VERSION for the builds.
GO_VERSION is defaulted in all Makefiles as `1.10.2`, but can be set when running make: `make GO_VERSION=1.10.1 deb`.

Signed-off-by: corbin-coleman <corbin.coleman@docker.com>
2018-05-21 15:58:06 -07:00
Eli Uriegas 04ec3b020e Make DOCKER_BUILD_PKGS reflective
The hardcoded values make it so that we have to update this everytime we
add/subtract something which is sometimes followed/not followed.

This makes it so that we no longer have to update this.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-05-14 22:42:03 +00:00
Corbin 9b3e8f85f0 Remove ubuntu-zesty from the default BUILD_PKGS in Makefile
Zesty is EOL and doesn't even have a subdirectory in the `deb` directory of this repo. There's no need to have it as a default.

Signed-off-by: Corbin <corbin.coleman@docker.com>
2018-02-20 11:29:11 -08:00
Eli Uriegas 9f717788b5 Removes fedora 25 aarch64 Dockerfile
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2018-01-22 19:10:56 +00:00
Eli Uriegas a8e527df5d Move .PHONY targets above actual targets
Was getting annoying to have to write it into one spot so moved them to
above the targets that they specify.

Signed-off-by: Eli Uriegas <seemethere101@gmail.com>
2017-12-28 17:53:59 +00:00
Eli Uriegas ffcd040b5c
Defaults Makefile VERSION variable to 0.0.0-dev (#67)
When building we should default to a dummy version unless otherwise
specified so we don't get ourselves confused over what is official and
what is not.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-12-07 14:25:41 -08:00
Eli Uriegas ca096b9620 Adds packaging for Fedora 27
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-11-14 19:13:47 +00:00
Sebastiaan van Stijn cc8fa77524
Add builds for debian buster
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-09-15 17:35:51 +02:00
Andrew Hsu a84d468adb remove fedora-24 build scripts because it is EOL
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-08-30 20:07:33 -07:00
Eli Uriegas bda73f99e4 Revert "Added the metrics plugin to the RPM/DEB packages"
This reverts commit ceac22bf22.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-07-24 18:16:04 -07:00
Stefan Scherer 1c61fdcafc
Add raspbian deb packages 2017-07-22 08:20:40 +02:00
Andrew Hsu 7cf8afa936 Merge pull request #31 from andrewhsu/f26
build fedora 26 packages
2017-07-21 14:44:11 -07:00
Eli Uriegas 36cc14cd48 End Ubuntu 16.10 (Yakkety) support
Ubuntu 16.10 (Yakkety) reached it's "End of Life" on July 20, 2017:
http://fridge.ubuntu.com/2017/07/20/ubuntu-16-10-yakkety-yak-end-of-life-reached-on-july-20-2017/

As such we are removing support for the distribution for future versions
of Docker packages.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-07-21 14:33:18 -07:00
Andrew Hsu 412824b465 build fedora 26 packages
Just released: https://docs.fedoraproject.org/en-US/Fedora/26/html/Release_Notes/

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-07-21 14:16:38 -07:00
Roberto Gandolfo Hashioka ceac22bf22 Added the metrics plugin to the RPM/DEB packages
- centos
 - fedora
 - ubuntu
 - debian

Signed-off-by: Roberto Gandolfo Hashioka <roberto_hashioka@hotmail.com>
2017-07-18 09:14:56 -07:00