镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Add input for runtime basedir - #168

Merged
crazy-max merged 4 commits into
docker:masterfrom
ArunKumarT1995:feature/rundirinput
Aug 6, 2025
Merged

crazy-max merged 4 commits into
docker:masterfrom
ArunKumarT1995:feature/rundirinput

Conversation

@ArunKumarT1995

@ArunKumarT1995 ArunKumarT1995 commented Aug 6, 2025 •

Copy link
Copy Markdown
Contributor

closes #141

Adding Input for runtime-basedir to fix XDG_RUNTIME_DIR needs to be set and writable error.

Updated the docs for the same.

@crazy-max crazy-max left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for your contrib!

See my comments and also you forgot to run docker buildx bake pre-checkin: https://github.com/docker/setup-docker-action/blob/master/.github/CONTRIBUTING.md#submitting-a-pull-request

When addressed please squash your commits.

Comment thread yarn.lock Outdated
Comment on lines +1 to +2
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems a tool on your machine updated the yarn lock, please remove these changes.

Comment thread src/main.ts Outdated
async () => {
const input: context.Inputs = context.getInputs();
const runDir = path.join(os.homedir(), `setup-docker-action-${crypto.randomUUID().slice(0, 8)}`);
const runDir = input.runtimeBasedir || path.join(os.homedir(), `setup-docker-action-${crypto.randomUUID().slice(0, 8)}`);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Need to keep random dir for multiple setup: #141 (comment)

Suggested change
const runDir = input.runtimeBasedir || path.join(os.homedir(), `setup-docker-action-${crypto.randomUUID().slice(0, 8)}`);
const runBasedir = input.runtimeBasedir || path.join(os.homedir(), `setup-docker-action`);
const runDir = path.join(runBasedir, `run-${crypto.randomUUID().slice(0, 8)}`);

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.

Done

@ArunKumarT1995

Copy link
Copy Markdown
Contributor Author

sorry let me run bake command and get back.

@crazy-max

Copy link
Copy Markdown
Member

sorry let me run bake command and get back.

Yes and also squash your commits, thanks!

Comment thread README.md Outdated
| `rootless` | Bool | `false` | Start daemon in rootless mode |

| `rootless` | Bool | `false` | Start daemon in rootless mode |
| `runtime-basedir` | String | `false` | Docker runtime base directory

@crazy-max crazy-max Aug 6, 2025 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
| `runtime-basedir` | String | `false` | Docker runtime base directory
| `runtime-basedir` | String | `<home>/setup-docker-action` | Docker runtime base directory

@ArunKumarT1995
ArunKumarT1995 force-pushed the feature/rundirinput branch 2 times, most recently from 8e15b57 to e416dff Compare August 6, 2025 19:08
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max
crazy-max force-pushed the feature/rundirinput branch from e416dff to 28ef634 Compare August 6, 2025 19:38

@crazy-max crazy-max left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM thanks

Pushed extra commit to move default to context

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
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.

Daemon fails to start on runner WSL Ubuntu latest Debian GNU/Linux 10 (buster)

2 participants