fix: use /bin/sh for Alpine-based images (rclone/rclone) in docker provider

This commit is contained in:
frostebite
2026-01-28 09:55:57 +00:00
parent c9af2e7562
commit 31e08ae064
4 changed files with 11 additions and 5 deletions

View File

@@ -137,7 +137,8 @@ class LocalDockerCloudRunner implements ProviderInterface {
// core.info(JSON.stringify({ workspace, actionFolder, ...this.buildParameters, ...content }, undefined, 4));
const entrypointFilePath = `start.sh`;
const fileContents = `#!/bin/bash
// Use #!/bin/sh for POSIX compatibility (Alpine-based images like rclone/rclone don't have bash)
const fileContents = `#!/bin/sh
set -e
mkdir -p /github/workspace/cloud-runner-cache

View File

@@ -55,7 +55,9 @@ class Docker {
if (!existsSync(githubHome)) mkdirSync(githubHome);
const githubWorkflow = path.join(runnerTempPath, '_github_workflow');
if (!existsSync(githubWorkflow)) mkdirSync(githubWorkflow);
const commandPrefix = image === `alpine` ? `/bin/sh` : `/bin/bash`;
// Alpine-based images (alpine, rclone/rclone, etc.) don't have /bin/bash, only /bin/sh
const isAlpineBasedImage = image === 'alpine' || image.startsWith('rclone/');
const commandPrefix = isAlpineBasedImage ? `/bin/sh` : `/bin/bash`;
// Check if host.docker.internal is needed (for LocalStack access from containers)
// Add host mapping if any environment variable contains host.docker.internal