File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "type" : " fixed" ,
3+ "description" : " `dockerfile` path is now relative to cargo workspace root"
4+ }
Original file line number Diff line number Diff line change @@ -120,7 +120,9 @@ impl<'a> Dockerfile<'a> {
120120 }
121121
122122 let path = match self {
123- Dockerfile :: File { path, .. } => PathBuf :: from ( path) ,
123+ Dockerfile :: File { path, .. } => {
124+ paths. metadata . workspace_root . join ( PathBuf :: from ( path) )
125+ }
124126 Dockerfile :: Custom { content, .. } => {
125127 let target_dir = paths
126128 . metadata
@@ -147,10 +149,6 @@ impl<'a> Dockerfile<'a> {
147149 }
148150 }
149151
150- // note that this is always relative to the PWD: if we have
151- // `$workspace_root/Dockerfile`, then running a build
152- // `PWD=$workspace_root/src/ cross build` would require
153- // the Dockerfile path to be specified as `../Dockerfile`.
154152 docker_build. args ( [ "--file" . into ( ) , path] ) ;
155153
156154 if let Some ( build_opts) = options. config . build_opts ( ) {
You can’t perform that action at this time.
0 commit comments