Permalink
Browse files

dependency and build script updates

  • Loading branch information...
kcq committed Jun 10, 2017
1 parent d8737fa commit c4fb6877ac571087a1d760f0ac73bac7fc1723b5
Showing with 28,215 additions and 119 deletions.
  1. +5 −0 .gitignore
  2. +16 −16 README.md
  3. +1 −1 scripts/docker-slim-builder.build.sh
  4. +1 −1 scripts/docker-slim-builder.run.sh
  5. +1 −1 scripts/env.sh
  6. +1 −1 scripts/{mac.src.deps.get.command → mac.src.cleanup.command}
  7. +2 −1 scripts/{mac.src.deps.restore.command → mac.src.deps.govendor.restore.command}
  8. +2 −1 scripts/{mac.src.deps.save.command → mac.src.prep.command}
  9. +1 −2 scripts/{mac.src.deps.clean.command → mac.tools.get.command}
  10. +25 −21 scripts/src.build.sh
  11. +1 −2 scripts/{src.deps.clean.sh → src.cleanup.sh}
  12. +14 −18 scripts/src.deps.and.build.sh
  13. +0 −26 scripts/src.deps.get.sh
  14. +15 −0 scripts/src.deps.govendor.restore.sh
  15. +0 −7 scripts/src.deps.restore.sh
  16. +0 −21 scripts/src.deps.save.sh
  17. +17 −0 scripts/src.prep.sh
  18. +16 −0 scripts/tools.get.sh
  19. +195 −0 vendor/bitbucket.org/madmo/fanotify/fanotify.go
  20. +32 −0 vendor/bitbucket.org/madmo/fanotify/fanotify_386.go
  21. +32 −0 vendor/bitbucket.org/madmo/fanotify/fanotify_amd64.go
  22. +100 −0 vendor/github.com/Sirupsen/logrus/CHANGELOG.md
  23. +21 −0 vendor/github.com/Sirupsen/logrus/LICENSE
  24. +501 −0 vendor/github.com/Sirupsen/logrus/README.md
  25. +64 −0 vendor/github.com/Sirupsen/logrus/alt_exit.go
  26. +26 −0 vendor/github.com/Sirupsen/logrus/doc.go
  27. +275 −0 vendor/github.com/Sirupsen/logrus/entry.go
  28. +193 −0 vendor/github.com/Sirupsen/logrus/exported.go
  29. +45 −0 vendor/github.com/Sirupsen/logrus/formatter.go
  30. +34 −0 vendor/github.com/Sirupsen/logrus/hooks.go
  31. +74 −0 vendor/github.com/Sirupsen/logrus/json_formatter.go
  32. +317 −0 vendor/github.com/Sirupsen/logrus/logger.go
  33. +143 −0 vendor/github.com/Sirupsen/logrus/logrus.go
  34. +10 −0 vendor/github.com/Sirupsen/logrus/terminal_appengine.go
  35. +10 −0 vendor/github.com/Sirupsen/logrus/terminal_bsd.go
  36. +14 −0 vendor/github.com/Sirupsen/logrus/terminal_linux.go
  37. +28 −0 vendor/github.com/Sirupsen/logrus/terminal_notwindows.go
  38. +21 −0 vendor/github.com/Sirupsen/logrus/terminal_solaris.go
  39. +82 −0 vendor/github.com/Sirupsen/logrus/terminal_windows.go
  40. +189 −0 vendor/github.com/Sirupsen/logrus/text_formatter.go
  41. +62 −0 vendor/github.com/Sirupsen/logrus/writer.go
  42. +99 −0 vendor/github.com/cloudimmunity/go-dockerclientx/AUTHORS
  43. +6 −0 vendor/github.com/cloudimmunity/go-dockerclientx/DOCKER-LICENSE
  44. +71 −0 vendor/github.com/cloudimmunity/go-dockerclientx/EXAMPLES.md
  45. +22 −0 vendor/github.com/cloudimmunity/go-dockerclientx/LICENSE
  46. +47 −0 vendor/github.com/cloudimmunity/go-dockerclientx/Makefile
  47. +53 −0 vendor/github.com/cloudimmunity/go-dockerclientx/README.md
  48. +136 −0 vendor/github.com/cloudimmunity/go-dockerclientx/auth.go
  49. +43 −0 vendor/github.com/cloudimmunity/go-dockerclientx/change.go
  50. +882 −0 vendor/github.com/cloudimmunity/go-dockerclientx/client.go
  51. +1,153 −0 vendor/github.com/cloudimmunity/go-dockerclientx/container.go
  52. +168 −0 vendor/github.com/cloudimmunity/go-dockerclientx/env.go
  53. +304 −0 vendor/github.com/cloudimmunity/go-dockerclientx/event.go
  54. +186 −0 vendor/github.com/cloudimmunity/go-dockerclientx/exec.go
  55. +26 −0 vendor/github.com/cloudimmunity/go-dockerclientx/external/github.com/Sirupsen/logrus/CHANGELOG.md
  56. +21 −0 vendor/github.com/cloudimmunity/go-dockerclientx/external/github.com/Sirupsen/logrus/LICENSE
  57. +355 −0 vendor/github.com/cloudimmunity/go-dockerclientx/external/github.com/Sirupsen/logrus/README.md
  58. +254 −0 vendor/github.com/cloudimmunity/go-dockerclientx/external/github.com/Sirupsen/logrus/entry.go
  59. +188 −0 vendor/github.com/cloudimmunity/go-dockerclientx/external/github.com/Sirupsen/logrus/exported.go
  60. +48 −0 vendor/github.com/cloudimmunity/go-dockerclientx/external/github.com/Sirupsen/logrus/formatter.go
  61. +34 −0 vendor/github.com/cloudimmunity/go-dockerclientx/external/github.com/Sirupsen/logrus/hooks.go
  62. +41 −0 ...r/github.com/cloudimmunity/go-dockerclientx/external/github.com/Sirupsen/logrus/json_formatter.go
  63. +206 −0 vendor/github.com/cloudimmunity/go-dockerclientx/external/github.com/Sirupsen/logrus/logger.go
  64. +94 −0 vendor/github.com/cloudimmunity/go-dockerclientx/external/github.com/Sirupsen/logrus/logrus.go
  65. +9 −0 vendor/github.com/cloudimmunity/go-dockerclientx/external/github.com/Sirupsen/logrus/terminal_bsd.go
  66. +20 −0 ...github.com/cloudimmunity/go-dockerclientx/external/github.com/Sirupsen/logrus/terminal_freebsd.go
  67. +12 −0 ...r/github.com/cloudimmunity/go-dockerclientx/external/github.com/Sirupsen/logrus/terminal_linux.go
  68. +21 −0 ...hub.com/cloudimmunity/go-dockerclientx/external/github.com/Sirupsen/logrus/terminal_notwindows.go
  69. +7 −0 ...github.com/cloudimmunity/go-dockerclientx/external/github.com/Sirupsen/logrus/terminal_openbsd.go
  70. +27 −0 ...github.com/cloudimmunity/go-dockerclientx/external/github.com/Sirupsen/logrus/terminal_windows.go
  71. +158 −0 ...r/github.com/cloudimmunity/go-dockerclientx/external/github.com/Sirupsen/logrus/text_formatter.go
  72. +31 −0 vendor/github.com/cloudimmunity/go-dockerclientx/external/github.com/Sirupsen/logrus/writer.go
  73. +62 −0 vendor/github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/opts/envfile.go
  74. +7 −0 ...or/github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/opts/hosts_unix.go
  75. +7 −0 ...github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/opts/hosts_windows.go
  76. +35 −0 vendor/github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/opts/ip.go
  77. +323 −0 vendor/github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/opts/opts.go
  78. +47 −0 vendor/github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/opts/ulimit.go
  79. +1 −0 ...github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/archive/README.md
  80. +902 −0 ...ithub.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/archive/archive.go
  81. +89 −0 ....com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/archive/archive_unix.go
  82. +50 −0 ...m/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/archive/archive_windows.go
  83. +383 −0 ...ithub.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/archive/changes.go
  84. +285 −0 ...com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/archive/changes_linux.go
  85. +97 −0 ...com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/archive/changes_other.go
  86. +27 −0 ....com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/archive/changes_unix.go
  87. +20 −0 ...m/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/archive/changes_windows.go
  88. +308 −0 ...r/github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/archive/copy.go
  89. +11 −0 ...hub.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/archive/copy_unix.go
  90. +9 −0 ....com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/archive/copy_windows.go
  91. +210 −0 ...r/github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/archive/diff.go
  92. +16 −0 ...ub.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/archive/time_linux.go
  93. +16 −0 .../cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/archive/time_unsupported.go
  94. +59 −0 ...r/github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/archive/wrap.go
  95. +196 −0 ...b.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/fileutils/fileutils.go
  96. +39 −0 ...ithub.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/homedir/homedir.go
  97. +14 −0 ...or/github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/ioutils/fmt.go
  98. +226 −0 ...b.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/ioutils/multireader.go
  99. +254 −0 ...ithub.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/ioutils/readers.go
  100. +6 −0 ...hub.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/ioutils/scheduler.go
  101. +13 −0 ...m/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/ioutils/scheduler_gccgo.go
  102. +47 −0 ....com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/ioutils/writeflusher.go
  103. +60 −0 ...ithub.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/ioutils/writers.go
  104. +187 −0 ...ithub.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/parsers/parsers.go
  105. +119 −0 ...or/github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/pools/pools.go
  106. +11 −0 ...ithub.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/promise/promise.go
  107. +168 −0 ...ithub.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/stdcopy/stdcopy.go
  108. +9 −0 .../github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/errors.go
  109. +83 −0 ...com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/events_windows.go
  110. +11 −0 ...github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/filesys.go
  111. +64 −0 ...om/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/filesys_windows.go
  112. +19 −0 ...r/github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/lstat.go
  113. +29 −0 ....com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/lstat_windows.go
  114. +17 −0 ...github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/meminfo.go
  115. +71 −0 ....com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/meminfo_linux.go
  116. +7 −0 ...loudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/meminfo_unsupported.go
  117. +44 −0 ...om/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/meminfo_windows.go
  118. +20 −0 ...r/github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/mknod.go
  119. +11 −0 ....com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/mknod_windows.go
  120. +46 −0 ...or/github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/stat.go
  121. +27 −0 ...b.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/stat_freebsd.go
  122. +33 −0 ...hub.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/stat_linux.go
  123. +17 −0 ...m/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/stat_unsupported.go
  124. +36 −0 ...b.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/stat_windows.go
  125. +11 −0 ...r/github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/umask.go
  126. +8 −0 ....com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/umask_windows.go
  127. +11 −0 ....com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/utimes_darwin.go
  128. +24 −0 ...com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/utimes_freebsd.go
  129. +28 −0 ...b.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/utimes_linux.go
  130. +13 −0 ...cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/utimes_unsupported.go
  131. +59 −0 ...b.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/xattrs_linux.go
  132. +11 −0 ...cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/system/xattrs_unsupported.go
  133. +111 −0 .../github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/ulimit/ulimit.go
  134. +33 −0 ...github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/units/duration.go
  135. +95 −0 vendor/github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/pkg/units/size.go
  136. +61 −0 vendor/github.com/cloudimmunity/go-dockerclientx/external/github.com/docker/docker/volume/volume.go
  137. +2 −0 ...udimmunity/go-dockerclientx/external/github.com/opencontainers/runc/libcontainer/user/MAINTAINERS
  138. +108 −0 ...loudimmunity/go-dockerclientx/external/github.com/opencontainers/runc/libcontainer/user/lookup.go
  139. +30 −0 ...mmunity/go-dockerclientx/external/github.com/opencontainers/runc/libcontainer/user/lookup_unix.go
  140. +21 −0 .../go-dockerclientx/external/github.com/opencontainers/runc/libcontainer/user/lookup_unsupported.go
  141. +413 −0 .../cloudimmunity/go-dockerclientx/external/github.com/opencontainers/runc/libcontainer/user/user.go
  142. +555 −0 vendor/github.com/cloudimmunity/go-dockerclientx/image.go
  143. +57 −0 vendor/github.com/cloudimmunity/go-dockerclientx/misc.go
  144. +128 −0 vendor/github.com/cloudimmunity/go-dockerclientx/network.go
  145. +49 −0 vendor/github.com/cloudimmunity/go-dockerclientx/signal.go
  146. +117 −0 vendor/github.com/cloudimmunity/go-dockerclientx/tar.go
  147. +96 −0 vendor/github.com/cloudimmunity/go-dockerclientx/tls.go
  148. +127 −0 vendor/github.com/cloudimmunity/go-dockerclientx/volume.go
  149. +167 −0 vendor/github.com/cloudimmunity/pdiscover/pevents.go
  150. +26 −0 vendor/github.com/cloudimmunity/pdiscover/pevents_darwin.go
  151. +318 −0 vendor/github.com/cloudimmunity/pdiscover/pevents_linux.go
  152. +10 −0 vendor/github.com/cloudimmunity/pdiscover/pinfo.go
  153. +83 −0 vendor/github.com/cloudimmunity/pdiscover/pinfo_darwin.go
  154. +57 −0 vendor/github.com/cloudimmunity/pdiscover/pinfo_linux.go
  155. +86 −0 vendor/github.com/cloudimmunity/system/architecture.go
  156. +11 −0 vendor/github.com/cloudimmunity/system/errors.go
  157. +172 −0 vendor/github.com/cloudimmunity/system/kernel_linux.go
  158. +15 −0 vendor/github.com/cloudimmunity/system/nstring_int8.go
  159. +15 −0 vendor/github.com/cloudimmunity/system/nstring_uint8.go
  160. +753 −0 vendor/github.com/cloudimmunity/system/syscalls.go
  161. +1 −0 vendor/github.com/cloudimmunity/system/system.go
  162. +38 −0 vendor/github.com/cloudimmunity/system/system_linux.go
  163. +392 −0 vendor/github.com/codegangsta/cli/CHANGELOG.md
  164. +21 −0 vendor/github.com/codegangsta/cli/LICENSE
  165. +1,381 −0 vendor/github.com/codegangsta/cli/README.md
  166. +492 −0 vendor/github.com/codegangsta/cli/app.go
  167. +24 −0 vendor/github.com/codegangsta/cli/appveyor.yml
  168. +44 −0 vendor/github.com/codegangsta/cli/category.go
  169. +21 −0 vendor/github.com/codegangsta/cli/cli.go
  170. +299 −0 vendor/github.com/codegangsta/cli/command.go
  171. +276 −0 vendor/github.com/codegangsta/cli/context.go
  172. +115 −0 vendor/github.com/codegangsta/cli/errors.go
  173. +93 −0 vendor/github.com/codegangsta/cli/flag-types.json
  174. +799 −0 vendor/github.com/codegangsta/cli/flag.go
  175. +627 −0 vendor/github.com/codegangsta/cli/flag_generated.go
  176. +28 −0 vendor/github.com/codegangsta/cli/funcs.go
  177. +255 −0 vendor/github.com/codegangsta/cli/generate-flag-types
  178. +294 −0 vendor/github.com/codegangsta/cli/help.go
  179. +122 −0 vendor/github.com/codegangsta/cli/runtests
  180. +191 −0 vendor/github.com/docker/go-connections/LICENSE
  181. +242 −0 vendor/github.com/docker/go-connections/nat/nat.go
  182. +57 −0 vendor/github.com/docker/go-connections/nat/parse.go
  183. +96 −0 vendor/github.com/docker/go-connections/nat/sort.go
  184. +21 −0 vendor/github.com/dustin/go-humanize/LICENSE
  185. +92 −0 vendor/github.com/dustin/go-humanize/README.markdown
  186. +31 −0 vendor/github.com/dustin/go-humanize/big.go
  187. +173 −0 vendor/github.com/dustin/go-humanize/bigbytes.go
  188. +143 −0 vendor/github.com/dustin/go-humanize/bytes.go
  189. +108 −0 vendor/github.com/dustin/go-humanize/comma.go
  190. +40 −0 vendor/github.com/dustin/go-humanize/commaf.go
  191. +23 −0 vendor/github.com/dustin/go-humanize/ftoa.go
  192. +8 −0 vendor/github.com/dustin/go-humanize/humanize.go
  193. +192 −0 vendor/github.com/dustin/go-humanize/number.go
  194. +25 −0 vendor/github.com/dustin/go-humanize/ordinals.go
  195. +113 −0 vendor/github.com/dustin/go-humanize/si.go
  196. +117 −0 vendor/github.com/dustin/go-humanize/times.go
  197. +20 −0 vendor/github.com/franela/goreq/LICENSE
  198. +3 −0 vendor/github.com/franela/goreq/Makefile
  199. +444 −0 vendor/github.com/franela/goreq/README.md
  200. +491 −0 vendor/github.com/franela/goreq/goreq.go
  201. +64 −0 vendor/github.com/franela/goreq/tags.go
  202. +15 −0 vendor/github.com/go-mangos/mangos/AUTHORS
  203. +56 −0 vendor/github.com/go-mangos/mangos/CONTRIBUTING
  204. +202 −0 vendor/github.com/go-mangos/mangos/LICENSE
  205. +85 −0 vendor/github.com/go-mangos/mangos/README.md
  206. +265 −0 vendor/github.com/go-mangos/mangos/conn.go
  207. +711 −0 vendor/github.com/go-mangos/mangos/core.go
  208. +77 −0 vendor/github.com/go-mangos/mangos/device.go
  209. +37 −0 vendor/github.com/go-mangos/mangos/dialer.go
  210. +26 −0 vendor/github.com/go-mangos/mangos/doc.go
  211. +45 −0 vendor/github.com/go-mangos/mangos/errors.go
  212. +36 −0 vendor/github.com/go-mangos/mangos/listener.go
  213. BIN vendor/github.com/go-mangos/mangos/mangos.jpg
  214. +172 −0 vendor/github.com/go-mangos/mangos/message.go
  215. +159 −0 vendor/github.com/go-mangos/mangos/options.go
  216. +158 −0 vendor/github.com/go-mangos/mangos/pipe.go
  217. +70 −0 vendor/github.com/go-mangos/mangos/port.go
  218. +37 −0 vendor/github.com/go-mangos/mangos/properties.go
  219. +221 −0 vendor/github.com/go-mangos/mangos/protocol.go
  220. +185 −0 vendor/github.com/go-mangos/mangos/protocol/pub/pub.go
  221. +296 −0 vendor/github.com/go-mangos/mangos/protocol/rep/rep.go
  222. +304 −0 vendor/github.com/go-mangos/mangos/protocol/req/req.go
  223. +177 −0 vendor/github.com/go-mangos/mangos/protocol/sub/sub.go
  224. +83 −0 vendor/github.com/go-mangos/mangos/socket.go
  225. +162 −0 vendor/github.com/go-mangos/mangos/transport.go
  226. +193 −0 vendor/github.com/go-mangos/mangos/transport/tcp/tcp.go
  227. +79 −0 vendor/github.com/go-mangos/mangos/util.go
  228. +124 −0 vendor/github.com/go-mangos/mangos/waiter.go
  229. +187 −0 vendor/vendor.json
View
@@ -1,3 +1,8 @@
.DS_Store
/docker-slim
/docker-slim-sensor
/dist_linux/
/dist_mac/
/bin/
/_gopath/
View
@@ -367,37 +367,38 @@ Note that you should be able to avoid including /etc/passwd if you are ok with u
## BUILD PROCESS
Go 1.5.1 or higher is required. Earlier versions of Go have a Docker/ptrace related bug (Go kills processes if your app is PID 1). When the 'monitor' is separate from the 'launcher' process it will be possible to user older Go versions again.
Go 1.8 or higher is recommended. You can use earlier version of Go, but it can't be lower than Go 1.5.1. Versions prior to 1.5.1 have a Docker/ptrace related bug (Go kills processes if your app is PID 1). When the 'monitor' is separate from the 'launcher' process it will be possible to user older Go versions again.
Before you build the tool you need to install GOX and Godep (optional; you'll need it only if you have problems pulling the dependencies with vanilla `go get`)
Before you build `docker-slim` you need to install `gox`. Additional tools to install:`golint` and `govendor`) (optional; you'll need it only if you have problems pulling the dependencies with vanilla `go get`)
* Godep - dependency manager ( https://github.com/tools/godep )
Tools:
1: `go get github.com/tools/godep`
* `gox` - Must install it if you want to use the build scripts (not required if you want to do native builds). See `https://github.com/mitchellh/gox` for more details.
* `govendor` - Should install if you intend to add/change dependencies (you can still manage dependencies manually if want). See `https://github.com/kardianos/govendor` for more details.
* `golint` - Optional tool for code analysis. See `https://github.com/golang/lint` for more details.
* GOX - to build Linux binaries on a Mac ( https://github.com/mitchellh/gox ):
1: `go get github.com/mitchellh/gox`
2: `gox -build-toolchain -os="linux" -os="darwin"` (note: might have to run it with `sudo`)
You can install these tools using the `tools.get.sh` shell script in the `scripts` directory.
Notes:
* Step 2 is not necessary with Go 1.5.
* Make sure you have `golint` if you intend to run the `src.inspect.sh` or `mac.src.inspect.command` scripts. Install it with `go get -u github.com/golang/lint/golint` if you don't have it.
#### Local Build Steps
Once you install the dependencies (GOX - required; Godep - optional) run these scripts:
1. Pull the dependencies: `./scripts/src.deps.get.sh`
1. Prepare the code (do it once after you download the code): `./scripts/src.prep.sh`
2. Build it: `./scripts/src.build.sh`
You can use the clickable `.command` scripts on Mac OS X (located in the `scripts` directory):
1. `mac.src.deps.get.command`
1. `mac.src.prep.command`
2. `mac.src.build.command`
Notes:
These helper scripts make it possible to build the code anywhere on the system. It doesn't have to be in the `$GOPATH/src` directory.
#### Traditional Go Way to Build
If you don't want to use the helper scripts you can build `docker-slim` using regular go commands:
@@ -407,9 +408,8 @@ If you don't want to use the helper scripts you can build `docker-slim` using re
3. `cd $GOPATH/src/github.com/docker-slim`
4. `git clone https://github.com/docker-slim/docker-slim.git` <- if you decide to use `go get` to pull the `docker-slim` repo make sure to use the `-d` flag, so Go doesn't try to build it
5. `cd docker-slim`
6. `go get -d -v ./...`
7. `go build -v ./apps/docker-slim` <- builds the main app in the repo's root directory
8. `env GOOS=linux GOARCH=amd64 go build -v ./apps/docker-slim-sensor` <- builds the sensor app (must be built as a linux executable)
6. `go build -v ./apps/docker-slim` <- builds the main app in the repo's root directory
7. `env GOOS=linux GOARCH=amd64 go build -v ./apps/docker-slim-sensor` <- builds the sensor app (must be built as a linux executable)
#### Builder Image Steps
@@ -484,4 +484,4 @@ Docker Hub: [dslim](https://hub.docker.com/r/dslim/) (dockerslim is already take
## NOTES
* The code is still not very pretty, so feel free to make improvements and submit your PRs :)
If the project sounds interesting or if you found a bug make sure to read `CONTRIBUTING.md` and submit a PR!
@@ -5,7 +5,7 @@ set -e
source env.sh
cd $BDIR
#docker-machine start default
eval "$(docker-machine env default)"
#eval "$(docker-machine env default)"
docker build -t my/docker-slim-builder .
@@ -4,6 +4,6 @@ set -e
source env.sh
cd $BDIR
eval "$(docker-machine env default)"
#eval "$(docker-machine env default)"
docker run -v `pwd`:/go/src/github.com/docker-slim/docker-slim -w /go/src/github.com/docker-slim/docker-slim/scripts -it --rm --name="docker-slim-builder" my/docker-slim-builder ./src.deps.and.build.sh
View
@@ -5,7 +5,7 @@ SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
BDIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )"
export GOPATH=$BDIR/_vendor:$BDIR
export GOPATH=$BDIR/_gopath
export PATH=$PATH:$GOPATH/bin
@@ -1,4 +1,4 @@
here="$(dirname "$BASH_SOURCE")"
cd $here
./src.deps.get.sh
./src.cleanup.sh
@@ -1,3 +1,4 @@
here="$(dirname "$BASH_SOURCE")"
cd $here
./src.deps.restore.sh
./src.deps.govendor.restore.sh
@@ -1,3 +1,4 @@
here="$(dirname "$BASH_SOURCE")"
cd $here
./src.deps.save.sh
./src.prep.sh
@@ -1,4 +1,3 @@
here="$(dirname "$BASH_SOURCE")"
cd $here
./src.deps.clean.sh
./tools.get.sh
View
@@ -6,33 +6,37 @@ SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
SDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
export CGO_ENABLED=0
source $SDIR/env.sh
pushd $BDIR/apps/docker-slim
BDIR_GOPATH=$BDIR/_gopath/src/github.com/docker-slim/docker-slim
pushd $BDIR_GOPATH/apps/docker-slim
build_time="$(date -u '+%Y-%m-%d_%I:%M:%S%p')"
tag="current"
revision="current"
if hash git 2>/dev/null && [ -e $BDIR/.git ]; then
if hash git 2>/dev/null && [ -e $BDIR_GOPATH/.git ]; then
tag="$(git describe --tags)"
revision="$(git rev-parse HEAD)"
fi
gox -osarch="linux/amd64" -output="$BDIR/bin/linux/docker-slim" -ldflags="-X utils.appVersionTag=$tag -X utils.appVersionRev=$revision -X utils.appVersionTime=$build_time"
gox -osarch="darwin/amd64" -output="$BDIR/bin/mac/docker-slim" -ldflags="-X utils.appVersionTag=$tag -X utils.appVersionRev=$revision -X utils.appVersionTime=$build_time"
#gox -osarch="linux/arm" -output="$BDIR/bin/linux_arm/docker-slim"
gox -osarch="linux/amd64" -output="$BDIR_GOPATH/bin/linux/docker-slim" -ldflags="-X utils.appVersionTag=$tag -X utils.appVersionRev=$revision -X utils.appVersionTime=$build_time"
gox -osarch="darwin/amd64" -output="$BDIR_GOPATH/bin/mac/docker-slim" -ldflags="-X utils.appVersionTag=$tag -X utils.appVersionRev=$revision -X utils.appVersionTime=$build_time"
#gox -osarch="linux/arm" -output="$BDIR_GOPATH/bin/linux_arm/docker-slim"
popd
pushd $BDIR/apps/docker-slim-sensor
gox -osarch="linux/amd64" -output="$BDIR/bin/linux/docker-slim-sensor"
#gox -osarch="linux/arm" -output="$BDIR/bin/linux_arm/docker-slim-sensor"
pushd $BDIR_GOPATH/apps/docker-slim-sensor
gox -osarch="linux/amd64" -output="$BDIR_GOPATH/bin/linux/docker-slim-sensor"
#gox -osarch="linux/arm" -output="$BDIR_GOPATH/bin/linux_arm/docker-slim-sensor"
popd
rm -rfv $BDIR/dist_mac
mkdir $BDIR/dist_mac
cp $BDIR/bin/mac/docker-slim $BDIR/dist_mac/docker-slim
cp $BDIR/bin/linux/docker-slim-sensor $BDIR/dist_mac/docker-slim-sensor
rm -rfv $BDIR/dist_linux
mkdir $BDIR/dist_linux
cp $BDIR/bin/linux/docker-slim $BDIR/dist_linux/docker-slim
cp $BDIR/bin/linux/docker-slim-sensor $BDIR/dist_linux/docker-slim-sensor
#rm -rfv $BDIR/dist_linux_arm
#mkdir $BDIR/dist_linux_arm
#cp $BDIR/bin/linux_arm/docker-slim $BDIR/dist_linux_arm/docker-slim
#cp $BDIR/bin/linux_arm/docker-slim-sensor $BDIR/dist_linux_arm/docker-slim-sensor
rm -rfv $BDIR/bin
rm -rfv $BDIR_GOPATH/dist_mac
mkdir $BDIR_GOPATH/dist_mac
cp $BDIR_GOPATH/bin/mac/docker-slim $BDIR_GOPATH/dist_mac/docker-slim
cp $BDIR_GOPATH/bin/linux/docker-slim-sensor $BDIR_GOPATH/dist_mac/docker-slim-sensor
rm -rfv $BDIR_GOPATH/dist_linux
mkdir $BDIR_GOPATH/dist_linux
cp $BDIR_GOPATH/bin/linux/docker-slim $BDIR_GOPATH/dist_linux/docker-slim
cp $BDIR_GOPATH/bin/linux/docker-slim-sensor $BDIR_GOPATH/dist_linux/docker-slim-sensor
#rm -rfv $BDIR_GOPATH/dist_linux_arm
#mkdir $BDIR_GOPATH/dist_linux_arm
#cp $BDIR_GOPATH/bin/linux_arm/docker-slim $BDIR_GOPATH/dist_linux_arm/docker-slim
#cp $BDIR_GOPATH/bin/linux_arm/docker-slim-sensor $BDIR_GOPATH/dist_linux_arm/docker-slim-sensor
rm -rfv $BDIR_GOPATH/bin
@@ -7,5 +7,4 @@ while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
SDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
source $SDIR/env.sh
cd $BDIR/_vendor
rm -rfv *
rm -rfv $BDIR/_gopath
@@ -7,34 +7,30 @@ while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
SDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
source $SDIR/env.sh
BDIR_GOPATH=$BDIR/_gopath/src/github.com/docker-slim/docker-slim
pushd $BDIR
mkdir -p _vendor
pushd $BDIR/_vendor
#used only in the builder container, so the link trick is not really necessary
rm -rf _gopath
mkdir _gopath
pushd $BDIR/_gopath
mkdir -p src/github.com/docker-slim
ln -sf $BDIR src/github.com/docker-slim/docker-slim
go get github.com/cloudimmunity/go-dockerclientx
go get github.com/cloudimmunity/pdiscover
go get github.com/cloudimmunity/system
go get github.com/codegangsta/cli
go get github.com/Sirupsen/logrus
go get github.com/franela/goreq
go get github.com/go-mangos/mangos
go get github.com/dustin/go-humanize
go get -d bitbucket.org/madmo/fanotify
go get github.com/docker/go-connections/nat
popd
pushd $BDIR/apps/docker-slim
pushd $BDIR_GOPATH/apps/docker-slim
build_time="$(date -u '+%Y-%m-%d_%I:%M:%S%p')"
tag="current"
revision="current"
if hash git 2>/dev/null && [ -e $BDIR/.git ]; then
if hash git 2>/dev/null && [ -e $BDIR_GOPATH/.git ]; then
tag="$(git describe --tags)"
revision="$(git rev-parse HEAD)"
fi
gox -osarch="linux/amd64" -output="$BDIR/bin/linux/docker-slim" -ldflags="-X utils.appVersionTag=$tag -X utils.appVersionRev=$revision -X utils.appVersionTime=$build_time"
gox -osarch="darwin/amd64" -output="$BDIR/bin/mac/docker-slim" -ldflags="-X utils.appVersionTag=$tag -X utils.appVersionRev=$revision -X utils.appVersionTime=$build_time"
gox -osarch="linux/amd64" -output="$BDIR_GOPATH/bin/linux/docker-slim" -ldflags="-X utils.appVersionTag=$tag -X utils.appVersionRev=$revision -X utils.appVersionTime=$build_time"
gox -osarch="darwin/amd64" -output="$BDIR_GOPATH/bin/mac/docker-slim" -ldflags="-X utils.appVersionTag=$tag -X utils.appVersionRev=$revision -X utils.appVersionTime=$build_time"
popd
pushd $BDIR/apps/docker-slim-sensor
gox -osarch="linux/amd64" -output="$BDIR/bin/linux/docker-slim-sensor"
pushd $BDIR_GOPATH/apps/docker-slim-sensor
gox -osarch="linux/amd64" -output="$BDIR_GOPATH/bin/linux/docker-slim-sensor"
popd
popd
View

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -e
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
SDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
source $SDIR/env.sh
pushd $BDIR/_gopath/src/github.com/docker-slim/docker-slim
govendor sync
govendor list
popd

This file was deleted.

Oops, something went wrong.
View

This file was deleted.

Oops, something went wrong.
View
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -e
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
SDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
source $SDIR/env.sh
pushd $BDIR
rm -rf _gopath
mkdir _gopath
pushd $BDIR/_gopath
mkdir -p src/github.com/docker-slim
ln -sf $BDIR src/github.com/docker-slim/docker-slim
popd
popd
View
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
if ! which govendor > /dev/null; then
echo "Tools: No govendor. Installing..."
go get -u github.com/kardianos/govendor
fi
if ! which gox > /dev/null; then
echo "Tools: No golint. Installing...."
go get -u github.com/golang/lint/golint
fi
if ! which gox > /dev/null; then
echo "Tools: No gox. Installing..."
go get -u github.com/mitchellh/gox
fi
Oops, something went wrong.

0 comments on commit c4fb687

Please sign in to comment.