summaryrefslogtreecommitdiffhomepage
path: root/tools/unitctl/unit-client-rs/src/unitd_docker.rs
diff options
context:
space:
mode:
authorAva Hahn <a.hahn@f5.com>2024-07-31 13:39:37 -0700
committerAva Hahn <110854134+avahahn@users.noreply.github.com>2024-08-01 10:51:43 -0700
commita91b961d620dc17c98b998a9142050defe46b56e (patch)
tree9a186ab53e8cb49ae9f4387066a2834e3cd1ec51 /tools/unitctl/unit-client-rs/src/unitd_docker.rs
parent43faf99d0347c13ddffecb4aaaf76d5771116d53 (diff)
downloadunit-a91b961d620dc17c98b998a9142050defe46b56e.tar.gz
unit-a91b961d620dc17c98b998a9142050defe46b56e.tar.bz2
tools/unitctl: make application directory configurable
* default behavior is now a read write application mount * use can specify a flag (-r) to mount app dir as read only Signed-off-by: Ava Hahn <a.hahn@f5.com>
Diffstat (limited to 'tools/unitctl/unit-client-rs/src/unitd_docker.rs')
-rw-r--r--tools/unitctl/unit-client-rs/src/unitd_docker.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/unitctl/unit-client-rs/src/unitd_docker.rs b/tools/unitctl/unit-client-rs/src/unitd_docker.rs
index 0d318096..2b9e0c7d 100644
--- a/tools/unitctl/unit-client-rs/src/unitd_docker.rs
+++ b/tools/unitctl/unit-client-rs/src/unitd_docker.rs
@@ -249,6 +249,7 @@ impl UnitdContainer {
pub async fn deploy_new_container(
socket: ControlSocket,
application: &String,
+ application_read_only: bool,
image: &String,
) -> Result<Vec<String>, UnitClientError> {
match Docker::connect_with_local_defaults() {
@@ -269,7 +270,7 @@ pub async fn deploy_new_container(
typ: Some(MountTypeEnum::BIND),
source: Some(application.clone()),
target: Some("/www".to_string()),
- read_only: Some(true),
+ read_only: Some(application_read_only),
..Default::default()
});