File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ pub(crate) fn run(
4141
4242 let mut docker = engine. subcommand ( "run" ) ;
4343 docker. add_userns ( ) ;
44+ docker. add_extra_args ( & options) ?;
4445
4546 // Podman on macOS doesn't support selinux labels, see issue #756
4647 #[ cfg( target_os = "macos" ) ]
Original file line number Diff line number Diff line change @@ -758,6 +758,9 @@ pub(crate) fn run(
758758 msg_info,
759759 )
760760 . wrap_err ( "could not determine mount points" ) ?;
761+ docker
762+ . add_extra_args ( & options)
763+ . wrap_err ( "could not determine additional container arguments" ) ?;
761764
762765 docker
763766 . add_seccomp ( engine. kind , target, & paths. metadata )
Original file line number Diff line number Diff line change @@ -955,6 +955,7 @@ pub(crate) trait DockerCommandExt {
955955 target : & Target ,
956956 metadata : & CargoMetadata ,
957957 ) -> Result < ( ) > ;
958+ fn add_extra_args ( & mut self , options : & DockerOptions ) -> Result < ( ) > ;
958959 fn add_mounts (
959960 & mut self ,
960961 options : & DockerOptions ,
@@ -1164,6 +1165,16 @@ impl DockerCommandExt for Command {
11641165 Ok ( ( ) )
11651166 }
11661167
1168+ fn add_extra_args ( & mut self , options : & DockerOptions ) -> Result < ( ) > {
1169+ let extra_args = options. config . extra_args ( & options. target ) ?;
1170+ if let Some ( args) = extra_args {
1171+ args. iter ( ) . for_each ( |arg| {
1172+ self . arg ( arg) ;
1173+ } ) ;
1174+ }
1175+ Ok ( ( ) )
1176+ }
1177+
11671178 fn add_mounts (
11681179 & mut self ,
11691180 options : & DockerOptions ,
You can’t perform that action at this time.
0 commit comments