Skip to content

Commit

Permalink
fix: revert unwanted change in docker.go
Browse files Browse the repository at this point in the history
refs #3414
  • Loading branch information
caarlos0 committed Oct 5, 2022
1 parent b88e836 commit d88600a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/pipe/docker/docker.go
Expand Up @@ -154,6 +154,14 @@ func process(ctx *context.Context, docker config.Docker, artifacts []*artifact.A
log := log.WithField("image", images[0])
log.Debug("tempdir: " + tmp)

dockerfile, err := tmpl.New(ctx).Apply(docker.Dockerfile)
if err != nil {
return err
}
if err := gio.Copy(dockerfile, filepath.Join(tmp, "Dockerfile")); err != nil {
return fmt.Errorf("failed to copy dockerfile: %w", err)
}

for _, file := range docker.Files {
if err := os.MkdirAll(filepath.Join(tmp, filepath.Dir(file)), 0o755); err != nil {
return fmt.Errorf("failed to copy extra file '%s': %w", file, err)
Expand Down

0 comments on commit d88600a

Please sign in to comment.