Skip to content

Commit

Permalink
Adde network=host
Browse files Browse the repository at this point in the history
  • Loading branch information
Téo Haÿs committed Mar 28, 2022
1 parent c90e6ac commit 7a86869
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
- Removed problematic options in the command parser for the "deploy" subcommand : You now HAVE to put the values for the "--command" and "--options" arguments between quotes.
- Added a "-f" short flag alias and a "--force" alias for the "--yes" option in the destroy subcommand
- Fixed a bug where double quotes were added to the command even when no command was provided, overriding the default Docker entrypoint.
- Added a "docker pull" command before deploy so that if you need the latest image, you'll get it.
- Added a "docker pull" command before deploy so that if you need the latest image, you'll get it.
- Added "network=host" in the deploy command
2 changes: 1 addition & 1 deletion src/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub fn deploy(
// We change the &Option<Vec<String>> object into a String using this method.

//We then create the command before sending it to the ssh_command() function
let cmd = format!("docker pull {image} && docker run --name container -v /home/container/container_fs:/var --privileged --cap-add=ALL {options} {image} {command} && docker container ls -a",
let cmd = format!("docker pull {image} && docker run --name container -v /home/container/container_fs:/var --network=host --privileged --cap-add=ALL {options} {image} {command} && docker container ls -a",
options = match options {
None => format!(""),
Some(content) => content.get(0).unwrap().to_string()
Expand Down

0 comments on commit 7a86869

Please sign in to comment.