From 8235af9772106b0c58c28ffe3d19712dda518493 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Sat, 14 Jan 2017 00:12:19 -0800 Subject: [PATCH] Add `--read-only` for `service create` and `service update` 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 --- docs/reference/commandline/service_create.md | 1 + docs/reference/commandline/service_update.md | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/reference/commandline/service_create.md b/docs/reference/commandline/service_create.md index c9e298096b..08771272a7 100644 --- a/docs/reference/commandline/service_create.md +++ b/docs/reference/commandline/service_create.md @@ -48,6 +48,7 @@ Options: --network list Network attachments (default []) --no-healthcheck Disable any container-specified HEALTHCHECK -p, --publish port Publish a port as a node port + --read-only Mount the container's root filesystem as read only --replicas uint Number of tasks --reserve-cpu decimal Reserve CPUs (default 0.000) --reserve-memory bytes Reserve Memory (default 0 B) diff --git a/docs/reference/commandline/service_update.md b/docs/reference/commandline/service_update.md index 301a0eabe8..654c59b875 100644 --- a/docs/reference/commandline/service_update.md +++ b/docs/reference/commandline/service_update.md @@ -58,6 +58,7 @@ Options: --no-healthcheck Disable any container-specified HEALTHCHECK --publish-add port Add or update a published port --publish-rm port Remove a published port by its target port + --read-only Mount the container's root filesystem as read only --replicas uint Number of tasks --reserve-cpu decimal Reserve CPUs (default 0.000) --reserve-memory bytes Reserve Memory (default 0 B)