Skip to content

start.sh Fails with "\r: command not found" and Missing "db:migrate" Script in Docker Container on Windows with PowerShell terminal #10

@kdv1995

Description

@kdv1995

Description
Summary: The start.sh script fails to execute properly in a Docker container, throwing a "\r: command not found" error and an npm error about a missing db:migrate script. This prevents the application from running.

Observed Behavior:

When running the Docker container with docker-compose up, the daemon-1 service exits with errors:

/daemon/start.sh: line 3: $'\r': command not found
npm error Missing script: "db:migrate"
Expected Behavior:

The start.sh script should:

Run migrations successfully via npm run db:migrate.
Start the Node.js application (node dist/index.js) without errors.

Suggested Fix:

Convert start.sh to Unix line endings (LF).

Environment
OS: Windows 11 (development), Docker (Linux-based container)
Node.js: v22.14.0
npm: v10.x (assumed based on Node version)
Database: PostgreSQL (version unspecified)
Dependencies: dotenvx@1.38.3, drizzle-orm (assumed), pg (PostgreSQL driver)
Labels
bug
docker
scripting

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions