Skip to content

armgit / floci

Public Imported from GitHub
0

Light, fluffy, and always free - The AWS Local Emulator alternative

fix: default shell executable to /bin/sh for Alpine compatibility (#241)

Mike Pettypieced02a1d9a13bd
diff --git a/docs/configuration/application-yml.md b/docs/configuration/application-yml.md
index e082789aef..bcb5103929 100644
--- a/docs/configuration/application-yml.md
+++ b/docs/configuration/application-yml.md
@@ -42,7 +42,7 @@ floci:
presign-secret: local-emulator-secret # HMAC secret for S3 pre-signed URL verification
init-hooks:
- shell-executable: /bin/bash
+ shell-executable: /bin/sh
timeout-seconds: 30
shutdown-grace-period-seconds: 2
diff --git a/docs/configuration/initialization-hooks.md b/docs/configuration/initialization-hooks.md
index 31130aebd7..dd42b4dd9b 100644
--- a/docs/configuration/initialization-hooks.md
+++ b/docs/configuration/initialization-hooks.md
@@ -117,7 +117,7 @@ You can customize hook behavior via configuration:
| Key | Default | Description |
|--------------------------------------------------|-------------|------------------------------------------------------------------------------------------------------------------|
-| `floci.init-hooks.shell-executable` | `/bin/bash` | Shell executable used to run scripts |
+| `floci.init-hooks.shell-executable` | `/bin/sh` | Shell executable used to run scripts |
| `floci.init-hooks.timeout-seconds` | `30` | Maximum execution time per script before it is terminated and considered failed |
| `floci.init-hooks.shutdown-grace-period-seconds` | `2` | Time to wait after calling `destroy()` before forcefully stopping the process (allows cleanup hooks to complete) |
diff --git a/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java b/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java
index 1de28d5806..bfc6a2316a 100644
--- a/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java
+++ b/src/main/java/io/github/hectorvent/floci/config/EmulatorConfig.java
@@ -430,7 +430,7 @@ public interface EmulatorConfig {
}
interface InitHooksConfig {
- @WithDefault("/bin/bash")
+ @WithDefault("/bin/sh")
String shellExecutable();
@WithDefault("2")
diff --git a/src/test/resources/application.yml b/src/test/resources/application.yml
index fef33bb35c..573a9c151a 100644
--- a/src/test/resources/application.yml
+++ b/src/test/resources/application.yml
@@ -37,7 +37,7 @@ floci:
presign-secret: test-secret
init-hooks:
- shell-executable: /bin/bash
+ shell-executable: /bin/sh
timeout-seconds: 5
shutdown-grace-period-seconds: 2