This fix is part of the discussion in 28199 about using
`truncate` to replace `--no-trunc`.
As part of the fix, a new function `truncate` has been
added for Go templates so that it is possible to use
```
docker stack services --format "{{truncate .ID 5}}: {{.Mode}} {{.Replicas}}"
```
to show truncated ID.
A unit test has been added.
This fix is related to 28199.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This fix tries to address the issue raised in 29972 where
it was not possible to specify `--read-only` for `docker service create`
and `docker service update`, in order to have the container's root file
system to be read only.
This fix adds `--read-only` and update the `ReadonlyRootfs` in `HostConfig`
through `service create` and `service update`.
Related docs has been updated.
Integration test has been added.
This fix fixes 29972.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Roberto Muñoz Fernández <robertomf@gmail.com>
Added an apparmorEnabled boolean in the Daemon struct to indicate if AppArmor is enabled or not. It is set in NewDaemon using sysInfo information.
Signed-off-by: Roberto Muñoz Fernández <robertomf@gmail.com>
gofmt'd
Signed-off-by: Roberto Muñoz Fernández <robertomf@gmail.com>
change the function name to something more adequate and changed the behaviour to show empty value on an apparmor disabled system.
Signed-off-by: Roberto Muñoz Fernández <robertomf@gmail.com>
go fmt
Signed-off-by: Roberto Muñoz Fernández <robertomf@gmail.com>
This fix updates SwarmKit to 78ae345f449ac69aa741c762df7e5f0020f70275
(from 037b4913929019d44bc927870bf2d92ce9ca261f)
The following issues in docker are related
- Can not update service in host publish mode (#30199) (fixed)
- Add `ReadonlyRootfs` in ContainerSpec for `--read-only` (#29972) (needed)
- Explicitly disallow network pluginv1 creation in swarm mode
(See discussion in docker/swarmkit/pull/1899, docker/swarmkit/pull/1894,
and docker/docker/pull/30332#issuecomment-274277948)
This fix fixes#30199
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
These are arm variants with different argument ordering because of
register alignment requirements.
fix#30516
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This fix tries to address the issue raised in 30178 where
service healthcheck is `{}` in remote API will result in
dns resolve failue.
The reason was that when service healthcheck is `{}`,
service binding was not done.
This fix fixes the issue.
An integration test has been added.
This fix fixes 30178.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
The following command fails when the target directory does not exist.
$ sudo make install DOCKER_MAKE_INSTALL_PREFIX=/opt/docker AUTO_GOPATH=1
KEEPBUNDLE=1 hack/make.sh install-binary
# WARNING! I don't seem to be running in a Docker container.
# The result of this command might be an incorrect build, and will not be
# officially supported.
#
# Try this instead: make all
#
---> Making bundle: install-binary (in bundles/1.14.0-dev/install-binary)
Installing docker to /opt/docker/bin/
cp: cannot create regular file '/opt/docker/bin/': No such file or directory
make: *** [Makefile:119: install] Error 1
The patch installs the target directory before copying any binaries.
$ sudo make install DOCKER_MAKE_INSTALL_PREFIX=/opt/docker AUTO_GOPATH=1
KEEPBUNDLE=1 hack/make.sh install-binary
# WARNING! I don't seem to be running in a Docker container.
# The result of this command might be an incorrect build, and will not be
# officially supported.
#
# Try this instead: make all
#
---> Making bundle: install-binary (in bundles/1.14.0-dev/install-binary)
Installing docker to /opt/docker/bin/
Installing dockerd to /opt/docker/bin/
Installing docker-runc to /opt/docker/bin/
Installing docker-containerd to /opt/docker/bin/
Installing docker-containerd-ctr to /opt/docker/bin/
Installing docker-containerd-shim to /opt/docker/bin/
Installing docker-proxy to /opt/docker/bin/
Installing docker-init to /opt/docker/bin/
Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com>
The original Compose config loading used the `compose` tag, which
was replaced by mapstructure. Some fields were left on the old tag. This
commit removes the old tag and uses types and mapstructure.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This fix tries to address the enhancement proposal raised in
27178 for filtering based on published or exposed ports of
`docker ps --filter`.
In this fix, two filter options, `publish` and `expose` have
been added to take either `<port>[/<protocol>]` or `<from>-<to>[/<protocol>]`
and filtering on containers.
An integration test has been added to cover the changes.
This fix fixes 27178.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This fix made several updates:
1. Update opts.MemBytes so that default value will not show up.
The reason is that in case a default value is decided by daemon,
instead of client, we actually want to not show default value.
2. Move `docker run/create/build` to use opts.MemBytes for `--shm-size`
This is to bring consistency between daemon and docker run
3. docs updates.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This fix fixes issue raised in 29492 where it was not
possible to specify a default `--default-shm-size` in daemon
configuration for each `docker run``.
The flag `--default-shm-size` which is reloadable, has been
added to the daemon configuation.
Related docs has been updated.
This fix fixes 29492.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>