Skip to content

chmod the docker-credential helper binary#1990

Open
APErebus wants to merge 1 commit into
mainfrom
ap/chmod-docker-helper
Open

chmod the docker-credential helper binary#1990
APErebus wants to merge 1 commit into
mainfrom
ap/chmod-docker-helper

Conversation

@APErebus
Copy link
Copy Markdown
Contributor

@APErebus APErebus commented Jun 4, 2026

We are packaging a new binary, docker-credential-octopus (introduced in #1981)

However, when loading calamari as a Kubernetes image volume as a read-only filesystem, this needs to be made executable.

We now perform a chmod +x on an array of binary names

@APErebus APErebus requested a review from matt-richardson June 4, 2026 07:19
@APErebus
Copy link
Copy Markdown
Contributor Author

APErebus commented Jun 4, 2026

I think I'm going to need to do this for dotnet-script as well, I'm just testing

@APErebus
Copy link
Copy Markdown
Contributor Author

APErebus commented Jun 4, 2026

I think I'm going to need to do this for dotnet-script as well, I'm just testing

We may be ok as we execute dotnet-script via dotnet, so it might be fine as it's not executing the binary directory from the read-only FS. Will still need to test

Copy link
Copy Markdown
Contributor

@matt-richardson matt-richardson left a comment

Choose a reason for hiding this comment

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

:simples:

A couple of pretty minor suggestions, but looks like it does what it says on the tin 👍

Comment thread build/Build.Docker.cs
Comment on lines +45 to +47
PowerShellTasks.PowerShell(_ => _
.EnableNoProfile()
.SetCommand($"chmod +x '{flavourFolder / platformFolder / binary}'"));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any particular reason you're not using File.SetUnixFileMode(path, mode)?

Would be quicker (and cleaner).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nope. Didn't know it existed until today 😅

Will change

Comment thread build/Build.Docker.cs
flavourFolder / "linux-amd64");
Log.Information("Renamed 'linux-x64' folder to 'linux-amd64'");

//a known list of binaries to chmod +x
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not sure you need this comment :)

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