Commit Graph

38 Commits

Author SHA1 Message Date
69d2858460 Do not patch Dockerfiles in CI
When building the Dockerfiles for development, those images are mainly used to
create a reproducible build-environment. The source code is bind-mounted into
the image at runtime; there is no need to create an image with the actual
source code, and copying the source code into the image would lead to a new
image being created for each code-change (possibly leading up to many "dangling"
images for previous code-changes).

However, when building (and using) the development images in CI, bind-mounting
is not an option, because the daemon is running remotely.

To make this work, the circle-ci script patched the Dockerfiles when CI is run;
adding a `COPY` to the respective Dockerfiles.

Patching Dockerfiles is not really a "best practice" and, even though the source
code does not and up in the image, the source would still be _sent_ to the daemon
for each build (unless BuildKit is used).

This patch updates the makefiles, circle-ci script, and Dockerfiles;

- When building the Dockerfiles locally, pipe the Dockerfile through stdin.
  Doing so, prevents the build-context from being sent to the daemon. This speeds
  up the build, and doesn't fill up the Docker "temp" directory with content that's
  not used
- Now that no content is sent, add the COPY instructions to the Dockerfiles, and
  remove the code in the circle-ci script to "live patch" the Dockerfiles.

Before this patch is applied (with cache):

```
$ time make -f docker.Makefile build_shell_validate_image
docker build -t docker-cli-shell-validate -f ./dockerfiles/Dockerfile.shellcheck .
Sending build context to Docker daemon     41MB
Step 1/2 : FROM    debian:stretch-slim
...
Successfully built 81e14e8ad856
Successfully tagged docker-cli-shell-validate:latest

2.75 real         0.45 user         0.56 sys
```

After this patch is applied (with cache)::

```
$ time make -f docker.Makefile build_shell_validate_image
cat ./dockerfiles/Dockerfile.shellcheck | docker build -t docker-cli-shell-validate -
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM    debian:stretch-slim
...
Successfully built 81e14e8ad856
Successfully tagged docker-cli-shell-validate:latest

0.33 real         0.07 user         0.08 sys
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 166856ab1b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8997667aa2
Component: cli
2019-03-26 14:26:01 +01:00
130caf6e0e connhelper: add e2e
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit 9b148db87a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 719508a935
Component: cli
2018-12-17 17:22:58 +01:00
1a085c96aa Refined engine implementations
Adapt the CLI to the host install model for 18.09.

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: 342afe44fb
Component: cli
2018-09-19 20:10:31 -07:00
f4a7b44342 Add engine commands built on containerd
This new collection of commands supports initializing a local
engine using containerd, updating that engine, and activating
the EE product

Signed-off-by: Daniel Hiltgen <daniel.hiltgen@docker.com>
Upstream-commit: fd2f1b3b66
Component: cli
2018-08-20 09:42:05 -07:00
eda72c01e5 Add help and remove watch targets in docker.Makefile
* Add the `help` target to document make targets when building using a
container
* Remove the `watch` target (filewatcher was removed with c0588a9c) from
docker.Makefile and Makefile

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
Upstream-commit: 760ca04709
Component: cli
2018-07-31 14:38:51 +02:00
23a1760da3 Make test-e2e run against experimental and non-experimental daemon
- `make test-e2e` runs the e2e tests twice : once against on
  non-experimental daemon (as before), once against an experimental
  daemon.
- adds `test-e2e-experimental` and `test-e2e-non-experimental` target
  to run tests for the specified cases

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: a522a78231
Component: cli
2018-06-25 11:46:35 +02:00
35713286b5 Make e2e test image
- Build image that contains everything needed to run e2e tests
- Add ability to run e2e tests against an endpoint

Signed-off-by: Christopher Crone <christopher.crone@docker.com>
Upstream-commit: 6b38918ce4
Component: cli
2018-05-29 13:39:31 +02:00
3fa889eb3f Add dockerfile for building on non-amd64 platforms
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 02ca1c8573
Component: cli
2018-01-18 13:16:58 -05:00
f8a7c9aa17 Add AUTHORS file and script
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 02e7b18fde
Component: cli
2018-01-02 17:00:22 +01:00
aa9a4c4bff Add platform and its components to docker version output
The Server section of version output is now composed of an Engine
component and potentially more, based on what the /version endpoint
returns.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 5f4c5f8bb6
Component: cli
2017-12-07 02:04:10 +01:00
0ee27e86a8 Add a way to just build windows and osx
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 51080d6148
Component: cli
2017-09-19 16:48:31 -07:00
fdee4e99e9 Re-adds test target to the Makefile
The test target existed before, this is to provide a legacy interface to
allow easy testing for downstream Docker CE.

Without this we would need separate Makefiles/Jenkinsfiles for releases
past 17.07. Later on this target could also be used to test both unit
tests and integration tests at the same time.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: d53c8de06b
Component: cli
2017-08-31 10:32:00 -07:00
847cb8e0df Add a Jenkinsfile
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 63d76065bb
Component: cli
2017-08-16 10:46:43 -04:00
581aa22bc8 Add scripts for setting up e2e test environment.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 26418a12fb
Component: cli
2017-08-16 10:35:56 -04:00
b4e14f104b Set DISABLE_WARN_OUTSIDE_CONTAINER in the Dockerfile so that we don't spend 10s sleeping in CI
also add time to validate check

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 058733969c
Component: cli
2017-08-15 14:34:43 -04:00
8adcc1277a Add a warning when make is run outside of a container.
The warning can be disabled by setting the environment variable

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 12a7387c8e
Component: cli
2017-07-26 15:58:15 -04:00
b7e7973a5f Merge pull request #266 from jphuynh/shellcheck
Add shellcheck for bash completion
Upstream-commit: b75596e1e4
Component: cli
2017-07-18 09:59:07 +02:00
0667ef33f8 Add DOCKER_BUILD_ARGS to support build with proxy
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 7d8681fadb
Component: cli
2017-07-14 05:20:18 -04:00
33db8883ea Fix code location when mounting to docker-cli-shell-validate
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
Upstream-commit: ffe8509663
Component: cli
2017-07-13 22:24:08 +01:00
dc6c9cd967 Reword to remove ambiguity with go validate
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
Upstream-commit: 2e7d24cae8
Component: cli
2017-07-13 22:24:08 +01:00
a61c7f009e Add shellcheck for bash completion
Signed-off-by: Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
Upstream-commit: b2fc35aefa
Component: cli
2017-07-13 22:24:08 +01:00
9fb14cdd14 Fix mounts for directories with weird chars
Fixes:
`make -f docker.Makefile binary`

When directories have characters like `&&` they must be wrapped in
quotes or else the docker run command will fail.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 1119e992f2
Component: cli
2017-06-21 17:47:40 -07:00
4bf796daf6 Add scripts and targets for manpages and yamldocs
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: ff615dbc4d
Component: cli
2017-06-05 19:10:44 +00:00
9cdca5ef2e pass in optional GITCOMMIT override
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 446af3a9b7
Component: cli
2017-05-24 22:45:42 +00:00
1d9c61db3a allow version number to be set in builds
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 3dfe334a7a
Component: cli
2017-05-22 13:22:42 -07:00
235c74487c Remove @ from Makefiles.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 73ebb07df5
Component: cli
2017-05-17 15:56:19 -04:00
473491581d Support running unit tests when files are saved.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 74c06a140b
Component: cli
2017-05-15 17:02:58 -04:00
a6473845ef Update the README
Remove referenced to developing on the host, we shouldn't support it.

Move script/validate to scripts/validate to be consistent.
Set the default target to be binary instead of clean.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 60b2dd3e23
Component: cli
2017-05-15 14:07:30 -04:00
71ca4e1c02 osx cross
Fix CI build

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a408fb0a61
Component: cli
2017-05-13 13:47:00 -04:00
564519acec Support building a dynbinary
Cleanup dynbinary and binary builds

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: a787cbc93b
Component: cli
2017-05-12 13:34:06 -04:00
59d08ee4b4 Fix typo in docker.Makefile
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: 076976791b
Component: cli
2017-05-11 02:02:13 -07:00
db689040ae update makefiles: add “vendor” target in docker.Makefile…
… so that contributors don’t need “vndr” on their laptop

Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: c1f0bee31c
Component: cli
2017-05-09 14:29:14 -07:00
dfb4d9262a define targets as “phony”, add comments, and mount docker.sock in dev target
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: 7f7e842702
Component: cli
2017-05-03 11:14:06 -07:00
93938768a0 Add gometalinter to CI
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e3f677794a
Component: cli
2017-05-02 17:15:56 -04:00
d9dd021654 Merge pull request #15 from gdevillele/pr-faster-build
improve speed of "go build" as well as "docker build"
Upstream-commit: 639764c00d
Component: cli
2017-04-28 13:08:39 -07:00
71e45d9207 add “test” target and make CI use it
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: 4d4203f7fd
Component: cli
2017-04-27 15:57:35 -07:00
11241e3a61 make go build and docker build operations faster
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: 87449dbaa1
Component: cli
2017-04-27 15:06:57 -07:00
2c780f4003 add Makefiles and document their use in the README
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: fb413981d3
Component: cli
2017-04-25 09:57:06 -07:00