Commit Graph

2758 Commits

Author SHA1 Message Date
Kenfe-Mickaël Laventure
ec43dc2b46 Merge pull request #1592 from AkihiroSuda/workdir2
ctr run: add --cwd
2017-10-04 09:17:21 -07:00
Kenfe-Mickael Laventure
26d4c2c217
Add an option to prevent putting the shim in a new mount namespace
This is needed for users on kernel older than 3.18 so they can avoid EBUSY
errors when trying to unlink, rename or remove a mountpoint that is present in
a shim namespace.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-10-04 09:16:02 -07:00
Michael Crosby
0ae9d8fabf Merge pull request #1567 from stevvooe/image-check-function
images: support checking status of image content
2017-10-04 11:40:43 -04:00
Akim Demaille
8ceeeed4ae style: move definition for consistency
Signed-off-by: Akim Demaille <akim.demaille@docker.com>
2017-10-04 17:02:51 +02:00
Akihiro Suda
b26e2e781c ctr run: add --cwd
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-10-04 04:40:08 +00:00
Stephen Day
f6d88927d5 Merge pull request #1583 from stevvooe/image-storage-validation
metadata: validation and testing of image store
2017-10-03 16:48:38 -07:00
Stephen J Day
698b6d15f7
metadata: validation and testing of image store
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-10-03 16:34:00 -07:00
Stephen J Day
c555df54c0
images: support checking status of image content
The `Check` function returns information about an image's content components
over a content provider. From this information, one can tell which content is
required, present or missing to run an image.

The utility can be demonstrated with the `check` command:

```console
$ ctr images check
REF                               TYPE                                                      DIGEST                                                                  STATUS            SIZE
docker.io/library/alpine:latest   application/vnd.docker.distribution.manifest.list.v2+json sha256:f006ecbb824d87947d0b51ab8488634bf69fe4094959d935c0c103f4820a417d incomplete (1/2)  1.5 KiB/1.9 MiB
docker.io/library/postgres:latest application/vnd.docker.distribution.manifest.v2+json      sha256:2f8080b9910a8b4f38ff5a55a82e77cb43d88bdbb16d723c71d18493590832e9 complete (13/13)  99.3 MiB/99.3 MiB
docker.io/library/redis:alpine    application/vnd.docker.distribution.manifest.v2+json      sha256:e633cded055a94202e4ccccb8125b7f383cd6ee56527ab890db643383a2647dd incomplete (6/7)  8.1 MiB/10.0 MiB
docker.io/library/ubuntu:latest   application/vnd.docker.distribution.manifest.list.v2+json sha256:60f835698ea19e8d9d3a59e68fb96fb35bc43e745941cb2ea9eaf4ba3029ed8a unavailable (0/?) 0.0 B/?
docker.io/trollin/busybox:latest  application/vnd.docker.distribution.manifest.list.v2+json sha256:54a6424f7a2d5f4f27b3d69e5f9f2bc25fe9087f0449d3cb4215db349f77feae complete (2/2)    699.9 KiB/699.9 KiB
```

The above shows us that we have two incomplete images and one that is
unavailable. The incomplete images are those that we know the complete
size of all content but some are missing. "Unavailable" means that the
check could not get enough information about the image to get its full
size.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-10-03 15:19:22 -07:00
Kenfe-Mickaël Laventure
7c9b0eab9f Merge pull request #1590 from crosbymichael/container-update
Add container update method
2017-10-03 14:33:58 -07:00
Michael Crosby
9e85035f15 Add container update method
This adds an update method to the container interface for the client
package.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-10-03 16:59:52 -04:00
Phil Estes
1c7a042e04 Merge pull request #1566 from stevvooe/split-children
images: provide separated children function for images
2017-10-03 13:46:46 -04:00
Phil Estes
6b9aafdab1 Merge pull request #1587 from Ace-Tang/remove_blank_line
Remove a blank line
2017-10-03 11:14:47 -04:00
Ace-Tang
2231de3760 Remove a blank line
Signed-off-by: Ace-Tang <aceapril@126.com>
2017-10-03 20:58:51 +08:00
Michael Crosby
8ded4fe3a7 Merge pull request #1581 from crosbymichael/lint-2
Comment more packages to pass go lint
2017-10-02 14:46:28 -04:00
Michael Crosby
451421b615 Comment more packages to pass go lint
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-10-02 13:54:56 -04:00
Michael Crosby
33e974ce99 Merge pull request #1577 from crosbymichael/lint-1
Update files based on go lint
2017-10-02 10:57:19 -04:00
Kenfe-Mickaël Laventure
2416559fa6 Merge pull request #1580 from tklauser/unix-mkdev-major-minor
Use Mkdev, Major and Minor functions from golang.org/x/sys/unix
2017-10-02 07:56:57 -07:00
Michael Crosby
f43b7acfd2 Update files based on go lint
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-10-02 10:15:28 -04:00
Daniel, Dao Quang Minh
579093f13f Merge pull request #1579 from tklauser/vendor-ansiterm
Remove stray entry for Azure/go-ansiterm from vendor.conf
2017-10-02 14:53:34 +01:00
Tobias Klauser
f01b139161 archive: use Mkdev, Major and Minor functions from golang.org/x/sys/unix
Now that golang.org/x/sys/unix provides the Mkdev, Major and Minor
functions for every OS, use them instead of the locally defined version
which uses the Linux specific device major/minor encoding.

This also means that the device number should now be properly encoded on
e.g. Darwin, FreeBSD or Solaris.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2017-10-02 15:13:03 +02:00
Tobias Klauser
727fd599fb ctr: remove SIGUNUSED from signal map
The SIGUNUSED constant was removed from golang.org/x/sys/unix in
https://go-review.googlesource.com/61771 as it is also removed from the
respective glibc headers.

This means the command

  ctr tasks kill SIGUNUSED ...

will no longer work. However, the same effect can be achieved with

  ctr tasks kill SIGSYS ...

as SIGSYS has the same value as SIGUNUSED used to have.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2017-10-02 15:10:31 +02:00
Tobias Klauser
e789135aa3 vendor: update golang.org/x/sys
Update golang.org/x/sys to 314a259e304ff91bd6985da2a7149bbf91237993

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2017-10-02 14:51:12 +02:00
Tobias Klauser
acc246e5d9 Remove stray entry for Azure/go-ansiterm from vendor.conf
go-ansiterm is no longer used since commit cf2c4609bd ("Bump runc with
console change for ONLCR") but for some reason there was a second entry
in vendor.conf. Remove it as well.

This fixes the following warning when running vndr:

  WARNING: package github.com/Azure/go-ansiterm is unused, consider removing it from vendor.conf

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2017-10-02 14:47:45 +02:00
Stephen J Day
ce6859fd25
images: provide separated children function for images
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-09-29 13:47:54 -07:00
Kenfe-Mickaël Laventure
16bf82360e Merge pull request #1570 from AkihiroSuda/oci-runtime-readonly
readonly: pass RW rootfs to runtime, and let the runtime remount it as RO
2017-09-29 13:36:26 -07:00
Akihiro Suda
27023c7fa2 readonly: pass RW rootfs to runtime, and let the runtime remount it as RO
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-09-29 06:20:26 +00:00
Derek McGowan
70b353dff2 Merge pull request #1551 from mlaventure/client-pull-set-labels
client: Allow setting image labels on Pull()
2017-09-28 10:18:11 -07:00
Akihiro Suda
9f84513b89 Merge pull request #1571 from allencloud/remove-defaultns-from-Client
remove field defaultns from struct Client
2017-09-29 01:06:20 +09:00
Allen Sun
fd44a3aec4 remove field defaultns from struct Client
Signed-off-by: Allen Sun <shlallen1990@gmail.com>
2017-09-28 23:53:21 +08:00
Kenfe-Mickael Laventure
df82159f4d
client: Allow setting image labels on Pull() and Import()
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-09-27 15:05:34 -07:00
Phil Estes
b24acea276 Merge pull request #1565 from allencloud/fix-potential-panic
fix a potential panic when map is nil
2017-09-27 09:50:30 -04:00
Allen Sun
382dafefc0 fix a potential panic when map is nil
Signed-off-by: Allen Sun <shlallen1990@gmail.com>
2017-09-27 13:59:37 +08:00
Phil Estes
cc9f58ac24 Merge pull request #1559 from mlaventure/fix-oor-panic
client: Prevent Out-Of-Range panic in task.Metrics()
2017-09-26 14:39:39 -04:00
Kenfe-Mickaël Laventure
cee13ebfc0 Merge pull request #1557 from crosbymichael/console-bump
Update console dep to 84eeaae905fa414d03e07bcd6c8d
2017-09-26 09:59:54 -07:00
Michael Crosby
cf2c4609bd Bump runc with console change for ONLCR
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-09-26 11:01:40 -04:00
Michael Crosby
d026f81360 Merge pull request #1562 from AkihiroSuda/ctr-images-q
ctr: add `ctr images ls --quiet`
2017-09-26 10:41:31 -04:00
Michael Crosby
ed811896ed Update console dep to 84eeaae905fa414d03e07bcd6c8d
This change removes the ClearONLCR from the console package providing
a console with the default settings from the console package.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-09-26 10:17:23 -04:00
Akihiro Suda
2a648136a9 ctr: add ctr images ls --quiet
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-09-26 09:43:10 +00:00
Kenfe-Mickael Laventure
af2226c938
client: Prevent Out-Of-Range panic in task.Metrics()
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-09-25 15:46:01 -07:00
Phil Estes
bd1f89b73f Merge pull request #1555 from crosbymichael/client-lint
Update client to pass go lint
2017-09-25 13:26:31 -04:00
Michael Crosby
51b9240b80 Update client to pass go lint
There is one breaking change with the function naming of UidGid to
UIDGID

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-09-25 13:11:42 -04:00
Phil Estes
1a9d9394ac Merge pull request #1558 from mlaventure/dialer-quick-fix
Move unix specific tidbits into dialer_unix.go
2017-09-25 12:48:47 -04:00
Derek McGowan
357eff8233 Merge pull request #1556 from crosbymichael/tests
State adding tests when submitting changes
2017-09-25 09:37:32 -07:00
Kenfe-Mickael Laventure
c42f56b3a1
Move unix specific tidbits into dialer_unix.go
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-09-25 09:30:09 -07:00
Michael Crosby
76a2d1cc88 State adding tests when submitting changes
This is a priority that tests are added for regressions and new
functionality.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-09-25 11:33:24 -04:00
Michael Crosby
76bfff3920 Merge pull request #1554 from mlaventure/list-images-filters
client: Allow specifying filters when listing images
2017-09-25 11:14:04 -04:00
Phil Estes
8e447197bc Merge pull request #1552 from allencloud/update-docs-and-comments
update docs and comments
2017-09-25 09:36:09 -04:00
Allen Sun
4700968ff3 update docs and comments
Signed-off-by: Allen Sun <shlallen1990@gmail.com>
2017-09-25 14:48:28 +08:00
Kenfe-Mickael Laventure
8f1dd43893
client: Allow specifying filters when listing images
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-09-24 20:32:06 -07:00
Stephen Day
20c621178a Merge pull request #1550 from stevvooe/beta1
release: prepare 1.0.0-beta.1
2017-09-22 13:44:55 -07:00