Commit Graph

436 Commits

Author SHA1 Message Date
Rolf Neugebauer
9507f102cc Rename .yaml to .yml
docker-compose and other utilities use the .yml extension.
For consistency rename all .yaml to .yml

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-27 09:53:26 +02:00
Riyaz Faizullabhoy
594253b0a8 fmt string fixes
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-03-24 10:19:21 -07:00
Justin Cormack
af846e8014 Add a moby build --pull option to force pulling images
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-24 17:15:34 +00:00
Justin Cormack
630cafe592 Merge pull request #1378 from justincormack/riddler-files
Use Go code to extract rootfs from system containers
2017-03-24 13:36:51 +00:00
Justin Cormack
dd4ee77a23 Use Go code to extract rootfs from system containers
- this removes the use of riddler to extract the rootfs, use code
  we were using for rootfs. riddler now just geenrates the config,
  next stage is to generate this ourselves
- change the naming of the daemons so no longer include number as we
  do not guarantee ordering as they start up simultaneously

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-24 13:05:28 +00:00
Justin Cormack
c33896dcdc Merge pull request #1357 from thebsdbox/vmdk
added the capability to produce a vmdk file through Moby
2017-03-23 11:25:58 +00:00
dan
3fa494cb60 Added the capability to output moby images as vmdk files for use with VMware Workstation/Fusion
Corrected naming from vmware->vmdk and fixed Makfile

Fixed mistake outputting a vhd instead of a vmdk in output.go

Build vmdk image and added to Docker Hub, corrected link in output.go

Modified directories to confirm to standard mkimage-<imgType>

Signed-off-by: Dan Finneran <dan@thebsdbox.co.uk>
2017-03-23 11:16:40 +00:00
Justin Cormack
a2049a0da9 Merge pull request #1370 from justincormack/no-docker2tar
Remove docker2tar docker image, use Docker directly from Go
2017-03-23 09:44:21 +00:00
Justin Cormack
b63d27d405 Remove docker2tar docker image, use Docker directly from Go
Removing the left over indirect creates that use the Docker socket
and run in containers not directly.

See #1347

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-22 22:26:13 +00:00
Rolf Neugebauer
b8af990d62 moby: Log error when the kernel untar fails
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-22 15:14:17 +00:00
Rolf Neugebauer
d6e50e72d0 moby: Add a 'run' command to execute an image on hyperkit
'moby run' will use the kernel and initrd image produced
by 'moby build' and, on macOS, will run it inside a
hyperkit VM. This assumes that you have a recent version
of Docker for Mac installed as it re-uses the hyperkit
and VPNKit from it.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-22 14:47:56 +00:00
Rolf Neugebauer
7a6bc781de moby: Introduce the "build" subcommand
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-22 14:38:02 +00:00
Rolf Neugebauer
547a3e9380 moby: Factor out build code into a separate source file
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-03-22 14:38:02 +00:00
Justin Cormack
bede7847e3 Move Go code to src/cmd
This does not get everything where we want it finally, see #1266
nor the optimal way of building, but it gets it out of top level.

Added instructions to build if you have a Go installation.

Not moving `vendor` yet.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-21 14:37:23 +00:00
Justin Cormack
3c58702d42 Fix accidental removal of /etc/mtab from images
This was breaking some containers that use it, was a mistake.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-20 23:27:37 +00:00
Justin Cormack
4da9303b17 Output kernel command line to a file in the kernel+initrd output case
Trying to find the relevant yaml file was an issue as we now support
`--name` and it might be in a different directory, so although it is
a bit verbose outputing a whole file at least it is more consistent.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-20 13:43:09 +00:00
Justin Cormack
c4c7c1e8d8 Add a metadata handler for GCP which allows ssh login
- this needs improvements to make it more "platform native", in
  particular GCP supports multiple users and more ssh key mangement
  options.
- at present you can login as root with any platform ssh key
- add support for uts=host and ipc=host
- set the hostname from the metadata as well

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-16 18:45:44 +00:00
Justin Cormack
ee76e8bdfd GCP image handling enhancements
- the `public` option was not previously implemented
- add `replace` only for GCP images which will error otherwise. Only
  recommended for use in development, in production use the `--name` option
  to provide a different name eaxch time. Note only applies to GCP images,
  will document these options properly soon.
- add a `family` option; this allows you to upload many images and the
  user can select the latest using the `family` option instead of a specific
  image.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-16 13:20:21 +00:00
Justin Cormack
7149da4b4f Add a --name cli option to the moby tool
This sets the base name of the built images which otherwise
defaults to the basename of your yaml file. This allows
building different versions easily eg adding git sha to the
output names.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-16 11:51:49 +00:00
Justin Cormack
a7d650f5be Merge pull request #1307 from ijc25/isoefi-autosize
tools: Calculate EFI ESP FAT FS size based on contents.
2017-03-15 14:22:20 +00:00
Ian Campbell
728115f0ee tools: Calculate EFI ESP FAT FS size based on contents.
This requires switching to the dosfstools from alpine:edge since neither the
busybox nor alpine:3.5 dosfstools supports the -C option (in fact alpine:3.5
only has mkfs.fat and not mkfs.vfat).

The 511k slack seems like a lot to me, but 256k was somehow not enough.

Fixes #1304.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2017-03-15 13:30:20 +00:00
Justin Cormack
ee3379290b Add upload to Google Cloud Storage and Google Compute Image creation
- the image upload uses the cloud API
- currently auth and image creation need the `gcloud` CLI tool.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-14 14:45:05 +00:00
Riyaz Faizullabhoy
450e39305b Merge pull request #1290 from riyazdf/ro-system-containers
Add read-only option to containers, apply to all except nginx
2017-03-13 16:23:44 +00:00
Riyaz Faizullabhoy
e8d88ece91 Add read-only option to containers, apply to all except nginx
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2017-03-13 15:51:03 +00:00
Justin Cormack
7a58dad3a3 Fix typo/copy paste for IPC namespaces
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-13 15:00:22 +00:00
Justin Cormack
40ce7977ae Add qcow2 output support
- outputs compressed qcow2 image
- 1GB underlying size, may need changing

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-10 16:38:37 +00:00
Justin Cormack
64d388d3fe Add VHD and GCE output formats
- VHD is uncompressed VHD. Currently hard coded at 1GB, which may need to change. Use `format: vhd`
- GCE is the GCE compressed tarred raw image. Use `format: gce-img` - reserving `gce` for actually
  uploading the image.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-10 16:10:48 +00:00
Tycho Andersen
3fa9192f56 better debugging output in more error cases
Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-03-09 14:29:40 -08:00
Tycho Andersen
183fb49d71 hoist kernel cmdline into moby.yaml
Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-03-09 14:29:40 -08:00
Justin Cormack
befb0bcdec Add in sysctl container
- based on @riyazdf earlier unmerged Go version 891c006d34/alpine/containers/cloud-config/main.go

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-09 14:41:19 +00:00
Tycho Andersen
1cfe28aaa4 better debugging output in some error cases
from:

2017/03/07 09:59:30 Failed to extract kernel image and tarball

to

2017/03/07 10:06:04 Failed to extract kernel image and tarball: Unable to find image 'mobylinux/kernel:7fa748810d7866797fd807a5682d5cb3c9c98111' locally

Signed-off-by: Tycho Andersen <tycho@docker.com>
2017-03-07 10:50:12 -08:00
Justin Cormack
3637f0a5bd Out with the old, in with the new Moby
- remove remainder of editions code
- add a new check container to run tests without Docker
- switch over `make test` to use new command to build tests

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-06 22:28:41 +00:00
Justin Cormack
4cf1e1290d Add output types for BIOS and EFI ISOs
Note that the EFI ISO is not yet automatically sized, and the
kernel command lines are currently hard coded in the builders.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-03 18:44:47 -08:00
Justin Cormack
2c789d84d6 Add initial support for specifying the output type
Currently only supports kernel+initrd output but will add the rest
soon.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-03 14:49:47 -08:00
Justin Cormack
890097dc8e Refactoring of Moby tool
- split out config processing a bit
- just use `capabilities` not `cap-add` and `cap-drop`
- allow use of CAP_ prefix on capabilities, as this is what `runc` uses
- add nginx to example config
- fix bind mounts

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-03-01 15:52:51 -08:00
Justin Cormack
22298c7761 Rough first version of the moby tool
- terrible code
- lots needs changing
- can build a Moby from a config yaml that boots

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-02-20 21:44:23 +00:00