Open Marvin-Brouwer opened 1 year ago
Some additional context. I tried doing
.Add($"../{InitDbScriptName}", $"startup/")
Of course without the random folder in tempDir
but then it can't find the file
And then the generated dockerfile looks like this:
FROM mcr.microsoft.com/mssql/server:2022-latest AS base
WORKDIR /
ADD startup/
EXPOSE 1433
Ok, I figured this one out, there's a method to set the working directory, which I thought was the same as setting the working directory of the dockerfile.
I would like to have some more documentation on how to use Copy
and Add
. Maybe CSDOC would suffice, then you can also reference the correct workdir method
neat, youre more than welcome to do a PR!
Cheers, Mario :)
I might at some point. However, I put the project where I'm using this on pause and I'm not the biggest docker wizard so I'll need to review that project to add to yours at some point. So not making any promises
I'm trying to build my own image, and I want to copy some files onto it. When I use an absolute path, the COPY and ADD commands break. When I try to generate the path and set copy the files there first, the
${RND}
part of the template don't match.I'm currently trying this:
The
CopyInitScript
is incorrectly named, it generates a script at runtime. How do I get the correct temp folder so my dockerfile and resources can be placed next to each other?