File tree 3 files changed +15
-0
lines changed
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(
41
41
42
42
let mut docker = engine. subcommand ( "run" ) ;
43
43
docker. add_userns ( ) ;
44
+ docker. add_extra_args ( & options) ?;
44
45
45
46
// Podman on macOS doesn't support selinux labels, see issue #756
46
47
#[ cfg( target_os = "macos" ) ]
Original file line number Diff line number Diff line change @@ -758,6 +758,9 @@ pub(crate) fn run(
758
758
msg_info,
759
759
)
760
760
. wrap_err ( "could not determine mount points" ) ?;
761
+ docker
762
+ . add_extra_args ( & options)
763
+ . wrap_err ( "could not determine additional container arguments" ) ?;
761
764
762
765
docker
763
766
. 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 {
955
955
target : & Target ,
956
956
metadata : & CargoMetadata ,
957
957
) -> Result < ( ) > ;
958
+ fn add_extra_args ( & mut self , options : & DockerOptions ) -> Result < ( ) > ;
958
959
fn add_mounts (
959
960
& mut self ,
960
961
options : & DockerOptions ,
@@ -1164,6 +1165,16 @@ impl DockerCommandExt for Command {
1164
1165
Ok ( ( ) )
1165
1166
}
1166
1167
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
+
1167
1178
fn add_mounts (
1168
1179
& mut self ,
1169
1180
options : & DockerOptions ,
You can’t perform that action at this time.
0 commit comments