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> {
120
120
}
121
121
122
122
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
+ }
124
126
Dockerfile :: Custom { content, .. } => {
125
127
let target_dir = paths
126
128
. metadata
@@ -147,10 +149,6 @@ impl<'a> Dockerfile<'a> {
147
149
}
148
150
}
149
151
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`.
154
152
docker_build. args ( [ "--file" . into ( ) , path] ) ;
155
153
156
154
if let Some ( build_opts) = options. config . build_opts ( ) {
You can’t perform that action at this time.
0 commit comments