Skip to content

Commit cecd662

Browse files
committed
Update ctx and copy .envbuilder to image
1 parent 45960bb commit cecd662

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

envbuilder.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,11 @@ func Run(ctx context.Context, options Options) error {
342342
}
343343
}
344344

345+
if options.PushImage {
346+
buildParams.DockerfileContent = buildParams.DockerfileContent + "\n" +
347+
"COPY .envbuilder .envbuilder"
348+
}
349+
345350
HijackLogrus(func(entry *logrus.Entry) {
346351
for _, line := range strings.Split(entry.Message, "\r") {
347352
options.Logger(notcodersdk.LogLevelInfo, "#%d: %s", stageNumber, color.HiBlackString(line))
@@ -521,7 +526,7 @@ func Run(ctx context.Context, options Options) error {
521526
// https://github.com/coder/envbuilder/pull/114
522527
RegistryMirrors: registryMirror,
523528
},
524-
SrcContext: buildParams.BuildContext,
529+
SrcContext: "/",
525530

526531
// For cached image utilization, produce reproducible builds.
527532
Reproducible: options.PushImage,

0 commit comments

Comments
 (0)