Skip to content

Conversation

@johnstcn
Copy link
Member

@johnstcn johnstcn commented Jun 23, 2024

Part of coder/envbuilder#234

  • Adds workaround for CreateFile that would previously fail with ETXTBSY when copying running binary to image
  • Add AllowedPaths to IgnoreListEntry to allow selectively copying ignored paths

@johnstcn johnstcn self-assigned this Jun 23, 2024
johnstcn added a commit to coder/envbuilder that referenced this pull request Jun 23, 2024
@johnstcn johnstcn requested a review from mtojek June 24, 2024 08:46
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice hacking 👍

{
Path: filepath.Clean(config.KanikoDir),
PrefixMatchOnly: false,
AllowedPaths: make(map[string]struct{}),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would wrap IgnoreListEntry{} with NewIgnoreListEntry/CreateIgnoreListEntry, and set AllowedPaths there.

Copy link
Member Author

@johnstcn johnstcn Jun 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might actually be simpler to just use a []string instead; I don't anticipate having more than 10 entries here ever. Assigning to a nil map panics, while appending to / ranging over a nil slice is fine.

@johnstcn johnstcn merged commit dc26a92 into main Jun 24, 2024
@mafredri mafredri deleted the cj/embed-binary branch September 25, 2024 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants