Commit graph

1238 commits

Author SHA1 Message Date
Andrew Hsu
1606fe0c04 Revert "only build selinux rpm if we have policy dir"
This reverts commit f9bc32067d.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2016-12-15 16:29:58 -08:00
Andrew Hsu
f9bc32067d only build selinux rpm if we have policy dir
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2016-12-13 17:01:48 -08:00
Andrew Hsu
fe995bdfad Revert "add selinux policy for centos-7"
This reverts commit 7e30cb6e52.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2016-12-08 15:49:13 -08:00
Andrew Hsu
4b2b2c0af6 Revert "add extra docker.te lines from rhel7.3 docker.spec"
This reverts commit 5455138728.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2016-12-08 15:49:09 -08:00
Andrew Hsu
85aa678ad8 Revert "get rhel7.3 selinux-policy-devel pkg for centos-7"
This reverts commit 97b6626138.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2016-12-08 15:49:05 -08:00
Justin Cormack
b7fe9bf7f5 [1.12] Update Go to 1.6.4
Golang security fix release

Note we still patch for darwin as this has not been merged in 1.6.4.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-12-07 11:42:29 -08:00
Andrew Hsu
97b6626138 get rhel7.3 selinux-policy-devel pkg for centos-7
Resolved conflict of bringing in this patch originally committed
to the 1.13.x branch. For this patch applied to the 1.12.x branch,
did not keep the photon case statement in generate.sh and did not
update to golang 1.7 in the centos-7/Dockerfile.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2016-12-06 11:18:21 -08:00
Andrew Hsu
5455138728 add extra docker.te lines from rhel7.3 docker.spec
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2016-12-06 11:14:53 -08:00
Andrew Hsu
7e30cb6e52 add selinux policy for centos-7
This policy is from commit
583a67ffdf

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2016-12-06 11:14:35 -08:00
Andrew Hsu
9d7bae7c5d run dnf upgrade before installing in fedora
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit ebd804bfb6)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-05 14:54:45 -08:00
Victor Vieux
190a96131c Merge pull request #27634 from justincormack/user-cap-test
Test that non root user cannot use default capabilities
2016-10-24 01:26:02 -07:00
Justin Cormack
5c0c9e4587 Test that non root user cannot use default capabilities
Test for #27590

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-10-22 12:18:43 +01:00
Felix Ruess
1552aa3d9a builder: update deb armhf ubuntu-trusty buildtags
Signed-off-by: Felix Ruess <felix.ruess@gmail.com>
(cherry picked from commit 63515bc59e)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-10-20 11:37:01 -07:00
Jean-Christophe Berthon
72875b0d01 builder: Add AppArmor to runc buildtags for armhf
On Raspbian and Debian Jessie for ARMv7 (aka armhf), the builtags for runc
were missing. These buildtags should include 'apparmor' and 'selinux'.

Signed-off-by: Jean-Christophe Berthon <huygens@berthon.eu>
(cherry picked from commit e0c7300e3b)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-10-20 11:36:29 -07:00
alexchen
1767966502 add check flag for CONFIG_NETFILTER_XT_MATCH_IPVS CONFIG_IP_VS_NFCT CONFIG_IP_VS_RR in contrib/check-config.sh
Signed-off-by: alexchen <alexchenunix@gmail.com>
(cherry picked from commit 4c74469d30)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-10-01 02:15:25 -07:00
Liam Macgillavry
fd7e763e7c missed DOCKER->DOCKERD change in 1ac1b78b3a for 'status'
Signed-off-by: Liam Macgillavry <liam@kumina.nl>
(cherry picked from commit 11eda60848)
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-09-26 19:33:36 -07:00
Dieter Reuter
07e0380379 Fix build deb for ARMv6
Signed-off-by: Dieter Reuter <dieter.reuter@me.com>
(cherry picked from commit 5907e4a872)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-16 15:37:42 -07:00
Thomas Tanaka
7b95154474 Add Oracle Linux distro specific selinux policy
With the latest OL7.2, selinux policy that is shipped
might not be the latest for it to work or build with
selinux policy for docker-1.12.

To be able to achieve that here is what is done:
1. Added systemd_machined policy which is part of systemd.
2. Temporarily comment out unconfined_typebounds because the
current OL7's selinux doesn't have unconfineduser selinux policy,
to include this will be too much. Will revisit this once we have
updated the selinux policy.

Fixes: #24612

Signed-off-by: Thomas Tanaka <thomas.tanaka@oracle.com>
(cherry picked from commit d6cae872c7)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 17:56:51 -07:00
Michael Crosby
2f6ca79080 Add selinux policy per distro
This adds the ability to have different profiles for individual distros
and versions of the distro because they all ship with and depend on
different versions of policy packages.

The `selinux` dir contains the unmodified policy that is being used
today.  The `selinux-fedora` dir contains the new policy for fedora 24
with the changes for it to compile and work on the system.

The fedora policy is from commit
4a6ce94da5

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit 32b1f26c51)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 17:56:50 -07:00
Harald Albers
98bbe72549 Fix bash completion for docker service {create,update} {-e,--env}
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 197f23da49)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 17:56:48 -07:00
Harald Albers
af77d47c1f Fix bash completion for docker swarm join --advertise-addr
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit fa1b82e5eb)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 17:56:47 -07:00
Steve Durrheimer
c573ad30b9 Add zsh completion for 'docker node rm --force'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit b58ef479a6)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 17:56:47 -07:00
Harald Albers
4dc1afc961 Add bash completion for docker node rm --force
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 46d3464362)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 17:56:46 -07:00
allencloud
e25a1ca19c update command description in CLI
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 6c5988ed8c)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 17:56:44 -07:00
Steve Durrheimer
d00d9dbbfb Add zsh completion for 'docker service {create,update} --container-label{-add,-rm}'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit ab95ec3dd9)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 17:56:43 -07:00
Steve Durrheimer
282dda382b Remove zsh completion for 'docker swarm inspect'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit f146f6127c)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-08-11 17:56:43 -07:00
Michael Crosby
0a4abdb0ac Remove the Require on the socket for the rpm
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit 3cddda3bbb)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-27 14:51:42 -07:00
Harald Albers
486d5aa47f Remove bash completion for docker swarm inspect
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 34d9a82409)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-27 14:51:41 -07:00
Harald Albers
55b920c988 bash completion for container labels to service {create,update}
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 13c138ec2a)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-27 14:51:41 -07:00
Stephen J Day
2f736927a0 cli: docker service|node|stack ps instead of tasks
Rather than conflict with the unexposed task model, change the names of
the object-oriented task display to `docker <object> ps`. The command
works identically to `docker service tasks`. This change is superficial.

This provides a more sensical docker experience while not trampling on
the task model that may be introduced as a top-level command at a later
date.

The following is an example of the display using `docker service ps`
with a service named `condescending_cori`:

```
$ docker service ps condescending_cori
ID                         NAME                  SERVICE             IMAGE   LAST STATE              DESIRED STATE  NODE
e2cd9vqb62qjk38lw65uoffd2  condescending_cori.1  condescending_cori  alpine  Running 13 minutes ago  Running        6c6d232a5d0e
```

The following shows the output for the node on which the command is
running:

```console
$ docker node ps self
ID                         NAME                  SERVICE             IMAGE   LAST STATE              DESIRED STATE  NODE
b1tpbi43k1ibevg2e94bmqo0s  mad_kalam.1           mad_kalam           apline  Accepted 2 seconds ago  Accepted       6c6d232a5d0e
e2cd9vqb62qjk38lw65uoffd2  condescending_cori.1  condescending_cori  alpine  Running 12 minutes ago  Running        6c6d232a5d0e
4x609m5o0qyn0kgpzvf0ad8x5  furious_davinci.1     furious_davinci     redis   Running 32 minutes ago  Running        6c6d232a5d0e
```

Signed-off-by: Stephen J Day <stephen.day@docker.com>
(cherry picked from commit 0aa4e1e689)
2016-07-27 11:20:25 -07:00
Aaron Lehmann
a3639e6ac6 Add failure action for rolling updates
This changes the default behavior so that rolling updates will not
proceed once an updated task fails to start, or stops running during the
update. Users can use docker service inspect --pretty servicename to see
the update status, and if it pauses due to a failure, it will explain
that the update is paused, and show the task ID that caused it to pause.
It also shows the time since the update started.

A new --update-on-failure=(pause|continue) flag selects the
behavior. Pause means the update stops once a task fails, continue means
the old behavior of continuing the update anyway.

In the future this will be extended with additional behaviors like
automatic rollback, and flags controlling parameters like how many tasks
need to fail for the update to stop proceeding. This is a minimal
solution for 1.12.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 57ae29aa74)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:24:43 -07:00
allencloud
4cd455a8d9 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 4e959ef2f7)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:15 -07:00
Steve Durrheimer
5aef7cc12d Add zsh completion for 'docker swarm join-token' command
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit a04bba8b89)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:14 -07:00
Aaron Lehmann
762a73bf7f Split advertised address from listen address
There are currently problems with "swarm init" and "swarm join" when an
explicit --listen-addr flag is not provided. swarmkit defaults to
finding the IP address associated with the default route, and in cloud
setups this is often the wrong choice.

Introduce a notion of "advertised address", with the client flag
--advertise-addr, and the daemon flag --swarm-default-advertise-addr to
provide a default. The default listening address is now 0.0.0.0, but a
valid advertised address must be detected or specified.

If no explicit advertised address is specified, error out if there is
more than one usable candidate IP address on the system. This requires a
user to explicitly choose instead of letting swarmkit make the wrong
choice. For the purposes of this autodetection, we ignore certain
interfaces that are unlikely to be relevant (currently docker*).

The user is also required to choose a listen address on swarm init if
they specify an explicit advertise address that is a hostname or an IP
address that's not local to the system. This is a requirement for
overlay networking.

Also support specifying interface names to --listen-addr,
--advertise-addr, and the daemon flag --swarm-default-advertise-addr.
This will fail if the interface has multiple IP addresses (unless it has
a single IPv4 address and a single IPv6 address - then we resolve the
tie in favor of IPv4).

This change also exposes the node's externally-reachable address in
docker info, as requested by #24017.

Make corresponding API and CLI docs changes.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit a0ccd0d42f)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:18:03 -07:00
Harald Albers
ac6d5a01c1 bash completion for docker swarm join-token
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 42b4d6ebe4)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:02 -07:00
Vincent Demeester
9ec67fd8d1 Append --registry-auth with with
`--with-registry-auth` is more explicit.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 8426f72107)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:01 -07:00
Sebastiaan van Stijn
83e40c5025 remove "secrets" from completion scripts
Swarm join has been changed in f5e1f6f688,
removing various options and the "node accept" command.

This removes the removed options from the completion
scripts.

NOTE: a new command ("docker swarm join-token") was
also added, but is not part of this commit.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c4ab20c5f8)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:17:01 -07:00
Aaron Lehmann
5d7a3f7b5f Replace secrets with join tokens
Implement the proposal from
https://github.com/docker/docker/issues/24430#issuecomment-233100121

Removes acceptance policy and secret in favor of an automatically
generated join token that combines the secret, CA hash, and
manager/worker role into a single opaque string.

Adds a docker swarm join-token subcommand to inspect and rotate the
tokens.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 2cc5bd33ee)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:16:59 -07:00
Harald Albers
8e0e7644d8 Add manual support for macvlan networks to bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 6c98d5bfac)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:16:15 -07:00
Harald Albers
2d5716544d Update completions for syslog log driver options
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 492fdf1f57)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:45 -07:00
Steve Durrheimer
80463d8000 Add zsh completion for 'docker node update --label-{add,rm}'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit cdb8383d7f)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:44 -07:00
Steve Durrheimer
b29a9fdc4b Add zsh completion for 'docker service {create,update} --log-{driver,opt}'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit 45484f5458)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:43 -07:00
Michael Crosby
14aee340f8 Remove docker.socket from rpm based systems
Fixes #23981

The selinux issue we are seeing in the report is related to the socket
file for docker and nothing else. By removing the socket docker starts
up correctly.

However, there is another motivation for removing socket activation from
docker's systemd files and that is because when you have daemons running
with --restart always whenever you have a host reboot those daemons
will not be started again because the docker daemon is not started by
systemd until a request comes into the docker API.

Leave it for deb based systems because everything is working correctly
for both socket activation and starting normally at boot.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit 04104c3a1e)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:42 -07:00
Harald Albers
6c3019702e bash completion for docker node update --label-{add,rm}
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit bc6e3c0b5e)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:41 -07:00
Harald Albers
4845b686b2 bash completion for docker service {create,update} --log-{driver,opt}
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 823e161de7)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:41 -07:00
Sebastiaan van Stijn
47a16dbe31 bump Go to 1.6.3
following the announcement;
https://groups.google.com/forum/m/#!topic/golang-announce/7JTsd70ZAT0

> [security] Go 1.6.3 and Go 1.7rc2 pre-announcement
>
> Hello gophers,
> We plan to issue Go 1.6.3 and Go 1.7rc2 on Monday July 18 at approximately 2am UTC.
> These are minor release to fix a security issue.
>
> Following our policy at https://golang.org/security, this is the pre-announcement of those releases.
>
> Because we are so late in the release cycle for Go 1.7, we will not issue a minor release of Go 1.5.
> Additionally, we plan to issue Go 1.7rc3 later next week, which will include any changes between 1.7rc1 and tip.
>
> Cheers,
> Chris on behalf of the Go team

**Note:**
the man/Dockerfile is not yet updated, because
the official image for Go 1.6.2 has not yet
been updated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 589bafddf3)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:39 -07:00
Sebastiaan van Stijn
4118e0c9ee Improve flag help consistency, and update docs
This adds the `--live-restore` option to the documentation.

Also synched usage description in the documentation
with the actual description, and re-phrased some
flag descriptions to be a bit more consistent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 64a8317a5a)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:24 -07:00
Vincent Demeester
285bfa04ac Small zsh completion fix on --pretty & --no-resolve
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 698bd5ab65)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:13 -07:00
Steve Durrheimer
e4d263c99b Update zsh completion for 'docker service {create,update} {--endpoint-mode,--mode}'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit 2e6922a6d3)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:12 -07:00
Steve Durrheimer
f6dfc0394f Add zsh completion for 'dockerd --oom-score-adjust'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
(cherry picked from commit 5d29732bdf)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-25 23:15:12 -07:00