Skip to content

fix(docker): install bash and curl on alpine for start.sh#9

Closed
prenansantana wants to merge 2 commits into
tinykit-studio:mainfrom
prenansantana:fix/dockerfile-install-bash-curl
Closed

fix(docker): install bash and curl on alpine for start.sh#9
prenansantana wants to merge 2 commits into
tinykit-studio:mainfrom
prenansantana:fix/dockerfile-install-bash-curl

Conversation

@prenansantana
Copy link
Copy Markdown

Summary

deploy/railway/start.sh has a #!/bin/bash shebang and uses bash-specific syntax — {1..30} brace expansion and wait -n — plus it calls curl to wait for PocketBase to become healthy. The node:20-alpine base image in deploy/docker/Dockerfile ships neither bash nor curl, so the container fails immediately at runtime with:

/usr/local/bin/docker-entrypoint.sh: exec: line 11: ./start.sh: not found

This is misleading — the file exists and is executable. The error is ENOENT on the shebang interpreter (/bin/bash), reported by the shell as the script itself being missing. Docker keeps restarting the container until you give up.

Fix

 FROM node:20-alpine

+RUN apk add --no-cache bash curl

 WORKDIR /app

Switching the shebang to #!/bin/sh is not an option because the script depends on bash features that BusyBox sh doesn't support.

Verified

Built and ran the image locally on linux/arm64. Container starts cleanly:

Starting tinykit...
Starting Pocketbase...
Pocketbase is ready!
Superuser ready!
Starting SvelteKit server...
Listening on http://0.0.0.0:3000

GET /tinykit returns HTTP 200.

Related

Stacks on top of #8 — both fixes are needed for any successful Docker deploy from deploy/docker/Dockerfile. They are independent bugs but the build is blocked by #8 first and runtime is blocked by this one second.

Test plan

  • docker build -f deploy/docker/Dockerfile -t tinykit . completes
  • docker run starts PocketBase and SvelteKit without restart loop
  • GET /tinykit returns 200

The Dockerfile copies only package*.json before running `npm ci`, but
the postinstall hook executes `node scripts/download-pocketbase.js`.
Since scripts/ has not been copied yet, npm ci fails with
MODULE_NOT_FOUND and the build aborts.

Copy scripts/ before npm ci so postinstall succeeds. The rest of the
source is still copied afterward to preserve layer caching for the
dependency install step.
start.sh has a #!/bin/bash shebang and uses bash-specific syntax
({1..30} brace expansion and `wait -n`), plus calls curl to wait
for PocketBase health. The node:20-alpine base image ships neither
bash nor curl, so the container fails immediately at runtime with
"./start.sh: not found" (ENOENT on the shebang interpreter).

Install bash and curl via apk so start.sh runs as authored.
@prenansantana
Copy link
Copy Markdown
Author

Consolidating into #8 — both fixes target the same Dockerfile and block the same deploy path, simpler to review as one.

@prenansantana prenansantana deleted the fix/dockerfile-install-bash-curl branch May 12, 2026 18:58
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.

1 participant