Commit Graph

110 Commits

Author SHA1 Message Date
Justin Cormack
7cf47d42f4 Use buildmode pie for Go code
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-17 16:03:50 +00:00
Justin Cormack
ab494d21e0 Clean up go-compile
- remove unused `--docker` option
- neater output for stages of check, build

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-15 19:43:03 +00:00
Justin Cormack
50215b9c6c Update to golang:1.7-alpine3.5 images
Now there is an Alpine 3.5 variant of the Go 1.7 images, use this.

fix #972

Note updated the containers/binfmt image as this will be converted
to go-compile shortly, at which point alpine-build-go can be removed.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-14 09:41:12 +00:00
Justin Cormack
5143cef148 Compile Go code with docker run not docker build
Go code is really fast to compile so we do not really need to use the
cache features of `docker build`. So make a compile container instead.
This can also output a build context and Dockerfile if you want to do
a build.

For reference, an uncached `docker build` of our Go code takes about
7s, a cached one 1.2s, and this takes 1.7s, so the best case is a little
worse, but we save a lot of images, and the worst case is better.

This is mainly designed to make the nested builds for containerd
containers simpler too. Will add a variant for the C code as well.

Also add `-static` to the flags so we always make static executables,
which was omitted previously.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-13 15:49:51 +00:00
Justin Cormack
0b31c9dc42 Merge pull request #978 from nathanleclaire/collect_system_logs
Collect system container logs for diagnostics
2017-01-10 22:23:50 +00:00
Nathan LeClaire
9c6367de50 Change system container label
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2017-01-10 13:29:47 -08:00
David Gageot
214bce6c1d [GCP] Configure diagnostics server
Signed-off-by: David Gageot <david@gageot.net>
2017-01-10 19:58:34 +01:00
Nathan LeClaire
b88b78e982 Fix streaming API request error
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2017-01-10 10:48:02 -08:00
Nathan LeClaire
7b61a27c69 Begin adding system container log support to diagnostics
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2017-01-10 08:37:37 -08:00
Justin Cormack
f0ad69e24a Merge pull request #975 from nathanleclaire/fix_daemon_avail_check
Fix daemon availability check
2017-01-10 11:42:30 +00:00
Nathan LeClaire
6c0a8ff42c Move daemon ping to use native Go code
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2017-01-09 16:25:15 -08:00
Nathan LeClaire
50ea998400 Check request type in /diagnose
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2017-01-09 11:13:40 -08:00
Nathan LeClaire
1a5347804e Fix faulty daemon availability check
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2017-01-09 10:27:13 -08:00
Justin Cormack
5a06152f98 Update Go build packages to Alpine 3.5
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-01-05 15:58:16 +00:00
David Scott
3fad706162 diagnostics: capture the networks and volumes db
This should help diagnose failures like that described in

https://github.com/docker/docker/issues/29636

Signed-off-by: David Scott <dave.scott@docker.com>
2017-01-04 11:52:43 +00:00
Riyaz Faizullabhoy
6245780591 Move linting to Go build
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-12-21 11:26:33 -08:00
Riyaz Faizullabhoy
0736e139d2 Add lint docker image for golang linting and testing to individual package subdirs
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-12-20 15:00:08 -08:00
Riyaz Faizullabhoy
f2a1c0dd24 Add golint, make linting top-level
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-12-19 16:13:02 -08:00
Justin Cormack
79e6f8c95d Update to Go 1.7.4
Security update.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-02 09:51:36 +00:00
Riyaz Faizullabhoy
8b7cdd41dc Use digests instead of tags where possible
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-12-01 09:39:02 -08:00
Justin Cormack
65d627b938 Use daemon version in diagnostics
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-24 12:23:27 +00:00
Justin Cormack
d1a1d7846b Update Docker init script for 1.13
- never update root filesystem see #583
- remove tests for earlier docker versions
- only use iptables override on desktop

fix #753

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-21 21:15:24 +00:00
Ian Campbell
33c80ced24 diagnostics: Collect networking and swarm node + service info
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-11-15 17:21:03 +00:00
Justin Cormack
d661b49ff9 Merge pull request #734 from justincormack/diagnostic-fixes
Fixes to diagnostics
2016-11-15 11:53:10 +00:00
Justin Cormack
de5bb1c1b9 Fixes and improvements to diagnostics
- We now only have nslookup not dig.
- Use curl not wget.
- add /proc/cpuinfo

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-15 11:45:29 +00:00
Ian Campbell
e950150495 diagnostics: Collect "docker version"
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-11-15 11:35:12 +00:00
Ian Campbell
5191a8ffbc diagnostics: Collect "docker info"
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-11-15 11:33:25 +00:00
Justin Cormack
b7550df1c5 Make diagnostics program return exit code
Add running diagnostics to test script.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-14 11:30:09 +00:00
Justin Cormack
44bc83b7d9 Improve matching of mounted drive in diagnostics
Was failing on AWS as drive did not match patter that was too precise.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-04 14:09:12 +00:00
Justin Cormack
9059240d47 Update to Go 1.7.3
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-10-20 13:17:16 +01:00
Justin Cormack
2c2f600995 add git to Go build package
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-10-16 13:49:28 +01:00
Justin Cormack
47124e8282 do not remove build containers
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-10-11 16:12:40 +01:00
Justin Cormack
588798404f Do not create latest tags for base images
As we never use these, do not create them.

Also update images where applicable.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-10-10 14:55:48 +01:00
Justin Cormack
652d5eddf3 Use build container id rather than tagging builds
This means that multiple builds will not conflict, so we can
remove the lock from the CI. Also quieter when no errors.

Some still left to do, only done the ones used in build and CI
initially. Some of the others will be cleaned up anyway later.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-29 20:21:17 +01:00
Justin Cormack
f19a699715 Add support for running a development bundle of Docker
Add a database key `bundle` that contains a path to a Docker dev
bundle eg `/.../docker/bundles/1.13.0-dev` where the docker
binaries to run can be found. This will be paired with a script
in `docker/docker` to set this key, so users can easily help
contribute to Docker development.

The change will be permanent until the key is removed or a factory
reset is done, or the bundle cannot be found.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-13 22:46:27 +01:00
Justin Cormack
a1299f3d07 simplify vendor tar
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-12 16:36:01 +01:00
Justin Cormack
8646f76ed2 update to latest alpine base images
Signed-off-by: Justin Cormack <justin@specialbusservice.com>
2016-09-12 16:02:07 +01:00
Justin Cormack
92642978a1 simplify tar for vendor directory
Signed-off-by: Justin Cormack <justin@specialbusservice.com>
2016-09-12 16:02:07 +01:00
Justin Cormack
b1597ff9a9 Move all output to the directories it will be in eventually
Signed-off-by: Justin Cormack <justin@specialbusservice.com>
2016-09-12 16:02:07 +01:00
Justin Cormack
6994e51cac run with no network
Signed-off-by: Justin Cormack <justin@specialbusservice.com>
2016-09-12 15:59:19 +01:00
Justin Cormack
b978ea9e79 clean up diagnostics server build
Signed-off-by: Justin Cormack <justin@specialbusservice.com>
2016-09-12 15:59:19 +01:00
Justin Cormack
ec46568c61 move vendor directory directly under packages
Signed-off-by: Justin Cormack <justin@specialbusservice.com>
2016-09-12 15:59:19 +01:00
Justin Cormack
301e633ad3 Include the Go binary in the hash of the go build base
As this is not installed via apk it was not being included in the
checksum.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-09 15:46:23 +01:00
Justin Cormack
4e43053ce7 set a timeout for database capture
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-08 22:18:04 +01:00
Justin Cormack
d7e4a92151 Merge pull request #380 from nathanleclaire/diagnostix
[WIP] Add ability for diagnostics to upload to S3 bucket
2016-09-08 09:41:03 +01:00
Justin Cormack
3a2c28f352 Closer to reproducible builds
Make an alpine base image for C and Go builds.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-06 13:18:11 +01:00
Justin Cormack
28d6e1717f more specific golang alpine base package
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-05 15:05:52 +01:00
Nathan LeClaire
173765ffce Use additional parent (global) context
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2016-09-02 16:45:05 -07:00
Nathan LeClaire
d2ff4a06ff Fix race condition(s) in command collection code
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2016-09-02 16:40:38 -07:00
Justin Cormack
98e5532237 diagnostics program fix up output
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-09-02 16:30:37 +01:00