-
-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
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:
var tempDir = (TemplateString)@"${TEMP}/fluentdockertest/${RND}";
Directory.CreateDirectory(tempDir);
var initScriptPath = (TemplateString)@$"{tempDir}/{InitScriptName}";
CopyInitScript(initScriptPath, dbCreateScripts);
var imageName = $"{container.FriendlyApplicationName}/{options.Name}";
container
.Builder
.DefineImage(imageName).ReuseIfAlreadyExists()
.From("mcr.microsoft.com/mssql/server:2022-latest", "base")
.UseWorkDir("/")
.Add(InitScriptName, $"startup/")
.ExposePorts(1433);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?
Metadata
Metadata
Assignees
Labels
No labels