<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/docker.git/integration/container/create_test.go, branch master</title>
<subtitle>github.com: dotcloud/docker.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/docker.git/'/>
<entry>
<title>integration: update error-assertions in tests</title>
<updated>2023-05-10T20:13:50+00:00</updated>
<author>
<name>Sebastiaan van Stijn</name>
<email>github@gone.nl</email>
</author>
<published>2023-05-10T11:19:53+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/docker.git/commit/?id=56fb56ccf030746bcdcf9803df0f848c156a4592'/>
<id>56fb56ccf030746bcdcf9803df0f848c156a4592</id>
<content type='text'>
- use is.ErrorType
- replace uses of client.IsErrNotFound for errdefs.IsNotFound, as
  the client no longer returns the old error-type.

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- use is.ErrorType
- replace uses of client.IsErrNotFound for errdefs.IsNotFound, as
  the client no longer returns the old error-type.

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fixing consistent aliases for OCI spec imports</title>
<updated>2023-05-08T09:57:52+00:00</updated>
<author>
<name>Jeyanthinath Muthuram</name>
<email>jeyanthinath10@gmail.com</email>
</author>
<published>2023-05-08T09:57:52+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/docker.git/commit/?id=307b09e7eb14e48a66752b036fb2a2eb53fa599c'/>
<id>307b09e7eb14e48a66752b036fb2a2eb53fa599c</id>
<content type='text'>
Signed-off-by: Jeyanthinath Muthuram &lt;jeyanthinath10@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Jeyanthinath Muthuram &lt;jeyanthinath10@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>daemon: add annotations to container HostConfig</title>
<updated>2023-02-23T23:59:00+00:00</updated>
<author>
<name>Cory Snider</name>
<email>csnider@mirantis.com</email>
</author>
<published>2023-02-17T20:06:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/docker.git/commit/?id=0ffaa6c7858f0a5d85318efda43a2d20a684eae2'/>
<id>0ffaa6c7858f0a5d85318efda43a2d20a684eae2</id>
<content type='text'>
Allow clients to set annotations on a container which will applied to
the container's OCI spec.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow clients to set annotations on a container which will applied to
the container's OCI spec.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix validation of IpcMode, PidMode, UTSMode, CgroupnsMode</title>
<updated>2022-05-25T15:41:51+00:00</updated>
<author>
<name>Sebastiaan van Stijn</name>
<email>github@gone.nl</email>
</author>
<published>2022-05-25T11:17:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/docker.git/commit/?id=c3d7a0c6033a2764dd85c3863809ac498ef129f2'/>
<id>c3d7a0c6033a2764dd85c3863809ac498ef129f2</id>
<content type='text'>
These HostConfig properties were not validated until the OCI spec for the container
was created, which meant that `container run` and `docker create` would accept
invalid values, and the invalid value would not be detected until `start` was
called, returning a 500 "internal server error", as well as errors from containerd
("cleanup: failed to delete container from containerd: no such container") in the
daemon logs.

As a result, a faulty container was created, and the container state remained
in the `created` state.

This patch:

- Updates `oci.WithNamespaces()` to return the correct `errdefs.InvalidParameter`
- Updates `verifyPlatformContainerSettings()` to validate these settings, so that
  an error is returned when _creating_ the container.

Before this patch:

    docker run -dit --ipc=shared --name foo busybox
    2a00d74e9fbb7960c4718def8f6c74fa8ee754030eeb93ee26a516e27d4d029f
    docker: Error response from daemon: Invalid IPC mode: shared.

    docker ps -a --filter name=foo
    CONTAINER ID   IMAGE     COMMAND   CREATED              STATUS    PORTS     NAMES
    2a00d74e9fbb   busybox   "sh"      About a minute ago   Created             foo

After this patch:

    docker run -dit --ipc=shared --name foo busybox
    docker: Error response from daemon: invalid IPC mode: shared.

     docker ps -a --filter name=foo
    CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

An integration test was added to verify the new validation, which can be run with:

    make BIND_DIR=. TEST_FILTER=TestCreateInvalidHostConfig DOCKER_GRAPHDRIVER=vfs test-integration

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These HostConfig properties were not validated until the OCI spec for the container
was created, which meant that `container run` and `docker create` would accept
invalid values, and the invalid value would not be detected until `start` was
called, returning a 500 "internal server error", as well as errors from containerd
("cleanup: failed to delete container from containerd: no such container") in the
daemon logs.

As a result, a faulty container was created, and the container state remained
in the `created` state.

This patch:

- Updates `oci.WithNamespaces()` to return the correct `errdefs.InvalidParameter`
- Updates `verifyPlatformContainerSettings()` to validate these settings, so that
  an error is returned when _creating_ the container.

Before this patch:

    docker run -dit --ipc=shared --name foo busybox
    2a00d74e9fbb7960c4718def8f6c74fa8ee754030eeb93ee26a516e27d4d029f
    docker: Error response from daemon: Invalid IPC mode: shared.

    docker ps -a --filter name=foo
    CONTAINER ID   IMAGE     COMMAND   CREATED              STATUS    PORTS     NAMES
    2a00d74e9fbb   busybox   "sh"      About a minute ago   Created             foo

After this patch:

    docker run -dit --ipc=shared --name foo busybox
    docker: Error response from daemon: invalid IPC mode: shared.

     docker ps -a --filter name=foo
    CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

An integration test was added to verify the new validation, which can be run with:

    make BIND_DIR=. TEST_FILTER=TestCreateInvalidHostConfig DOCKER_GRAPHDRIVER=vfs test-integration

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't set default platform on container create</title>
<updated>2020-10-20T20:17:23+00:00</updated>
<author>
<name>Brian Goff</name>
<email>cpuguy83@gmail.com</email>
</author>
<published>2020-10-15T23:01:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/docker.git/commit/?id=88c02716053d3cb6f88b17ea9d4a3f21f4d8bcba'/>
<id>88c02716053d3cb6f88b17ea9d4a3f21f4d8bcba</id>
<content type='text'>
This fixes a regression based on expectations of the runtime:

```
docker pull arm32v7/alpine
docker run arm32v7/alpine
```

Without this change, the `docker run` will fail due to platform
matching on non-arm32v7 systems, even though the image could run
(assuming the system is setup correctly).

This also emits a warning to make sure that the user is aware that a
platform that does not match the default platform of the system is being
run, for the cases like:

```
docker pull --platform armhf busybox
docker run busybox
```

Not typically an issue if the requests are done together like that, but
if the image was already there and someone did `docker run` without an
explicit `--platform`, they may very well be expecting to run a native
version of the image instead of the armhf one.

This warning does add some extra noise in the case of platform specific
images being run, such as `arm32v7/alpine`, but this can be supressed by
explicitly setting the platform.

Signed-off-by: Brian Goff &lt;cpuguy83@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a regression based on expectations of the runtime:

```
docker pull arm32v7/alpine
docker run arm32v7/alpine
```

Without this change, the `docker run` will fail due to platform
matching on non-arm32v7 systems, even though the image could run
(assuming the system is setup correctly).

This also emits a warning to make sure that the user is aware that a
platform that does not match the default platform of the system is being
run, for the cases like:

```
docker pull --platform armhf busybox
docker run busybox
```

Not typically an issue if the requests are done together like that, but
if the image was already there and someone did `docker run` without an
explicit `--platform`, they may very well be expecting to run a native
version of the image instead of the armhf one.

This warning does add some extra noise in the case of platform specific
images being run, such as `arm32v7/alpine`, but this can be supressed by
explicitly setting the platform.

Signed-off-by: Brian Goff &lt;cpuguy83@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace service "Capabilities" w/ add/drop API</title>
<updated>2020-07-27T17:09:42+00:00</updated>
<author>
<name>Brian Goff</name>
<email>cpuguy83@gmail.com</email>
</author>
<published>2020-07-23T18:03:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/docker.git/commit/?id=24f173a003727611aa482a55b812e0e39c67be65'/>
<id>24f173a003727611aa482a55b812e0e39c67be65</id>
<content type='text'>
After dicussing with maintainers, it was decided putting the burden of
providing the full cap list on the client is not a good design.
Instead we decided to follow along with the container API and use cap
add/drop.

This brings in the changes already merged into swarmkit.

Signed-off-by: Brian Goff &lt;cpuguy83@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After dicussing with maintainers, it was decided putting the burden of
providing the full cap list on the client is not a good design.
Instead we decided to follow along with the container API and use cap
add/drop.

This brings in the changes already merged into swarmkit.

Signed-off-by: Brian Goff &lt;cpuguy83@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix status code for missing --volumes-from container</title>
<updated>2020-06-29T11:28:14+00:00</updated>
<author>
<name>Sebastiaan van Stijn</name>
<email>github@gone.nl</email>
</author>
<published>2020-06-29T11:28:14+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/docker.git/commit/?id=3258d565cfff73dc9eea8e03f05e691b2937d30a'/>
<id>3258d565cfff73dc9eea8e03f05e691b2937d30a</id>
<content type='text'>
If the container specified in `--volumes-from` did not exist, the
API returned a 404 status, which was interpreted by the CLI as the
specified _image_ to be missing (even if that was not the case).

This patch changes these error to return a 400 (bad request);

Before this change:

    # make sure the image is present
    docker pull busybox
    docker create --volumes-from=nosuchcontainer busybox
    # Unable to find image 'busybox:latest' locally
    # latest: Pulling from library/busybox
    # Digest: sha256:95cf004f559831017cdf4628aaf1bb30133677be8702a8c5f2994629f637a209
    # Status: Image is up to date for busybox:latest
    # Error response from daemon: No such container: nosuchcontainer

After this change:

    # make sure the image is present
    docker pull busybox
    docker create --volumes-from=nosuchcontainer busybox
    # Error response from daemon: No such container: nosuchcontainer

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the container specified in `--volumes-from` did not exist, the
API returned a 404 status, which was interpreted by the CLI as the
specified _image_ to be missing (even if that was not the case).

This patch changes these error to return a 400 (bad request);

Before this change:

    # make sure the image is present
    docker pull busybox
    docker create --volumes-from=nosuchcontainer busybox
    # Unable to find image 'busybox:latest' locally
    # latest: Pulling from library/busybox
    # Digest: sha256:95cf004f559831017cdf4628aaf1bb30133677be8702a8c5f2994629f637a209
    # Status: Image is up to date for busybox:latest
    # Error response from daemon: No such container: nosuchcontainer

After this change:

    # make sure the image is present
    docker pull busybox
    docker create --volumes-from=nosuchcontainer busybox
    # Error response from daemon: No such container: nosuchcontainer

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #40725 from cpuguy83/check_img_platform</title>
<updated>2020-05-21T18:33:27+00:00</updated>
<author>
<name>Tibor Vass</name>
<email>tiborvass@users.noreply.github.com</email>
</author>
<published>2020-05-21T18:33:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/docker.git/commit/?id=5c10ea6ae80589c2d56d618df54927e92b0b0136'/>
<id>5c10ea6ae80589c2d56d618df54927e92b0b0136</id>
<content type='text'>
Accept platform spec on container create</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Accept platform spec on container create</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed small documentation typo</title>
<updated>2020-05-18T15:36:53+00:00</updated>
<author>
<name>Cristina Yenyxe Gonzalez Garcia</name>
<email>cristina.yenyxe@gmail.com</email>
</author>
<published>2020-05-18T13:44:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/docker.git/commit/?id=6bc112abdec7dd0a0d7d397dfd08624d53c8cc89'/>
<id>6bc112abdec7dd0a0d7d397dfd08624d53c8cc89</id>
<content type='text'>
Signed-off-by: Cristina Yenyxe Gonzalez Garcia &lt;cristina.yenyxe@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Cristina Yenyxe Gonzalez Garcia &lt;cristina.yenyxe@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Accept platform spec on container create</title>
<updated>2020-03-20T23:10:36+00:00</updated>
<author>
<name>Brian Goff</name>
<email>cpuguy83@gmail.com</email>
</author>
<published>2020-03-19T20:54:48+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/docker.git/commit/?id=7a9cb29fb980c0ab3928272cdc24c7089b2fcf64'/>
<id>7a9cb29fb980c0ab3928272cdc24c7089b2fcf64</id>
<content type='text'>
This enables image lookup when creating a container to fail when the
reference exists but it is for the wrong platform. This prevents trying
to run an image for the wrong platform, as can be the case with, for
example binfmt_misc+qemu.

Signed-off-by: Brian Goff &lt;cpuguy83@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This enables image lookup when creating a container to fail when the
reference exists but it is for the wrong platform. This prevents trying
to run an image for the wrong platform, as can be the case with, for
example binfmt_misc+qemu.

Signed-off-by: Brian Goff &lt;cpuguy83@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
