Skip to content

fly launch generates invalid .dockerignore with backslashes on Windows #4727

@jamincan

Description

@jamincan

Issue: When running fly launch on Windows, the generated .dockerignore file contains backslashes (e.g., **\*.db). Deploys from the cli still work, but when deploying from github actions using superfly/flyctl-actions, the build fails with the error: #5 ERROR: error from sender: failed to match excludepatterns: syntax error in pattern. Manually changing the backslashes to slashes fixes the issue.

  • Operating system: Windows 11 Pro 25H2
  • Fly Version: 0.4.3

fly.toml

app = 'cfms'
primary_region = 'yyz'

[env]
  NODE_ENV = "production"
  DATABASE_URL = "file:/data/sqlite.db"
  BETTER_AUTH_URL = "https://cfms.fly.dev"

[http_service]
  internal_port = 3000
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0

[deploy]
  release_command = "pnpm run db:migrate"

[[mounts]]
  source = "data"
  destination = "/data"

[[vm]]
  memory = '1gb'
  cpus = 1
  memory_mb = 1024

Command output:

#5 [internal] load build context
#5 transferring context: 60B 0.0s done
#5 ERROR: error from sender: failed to match excludepatterns: syntax error in pattern
------
 > [internal] load build context:
------
Error: failed to fetch an image or build from source: error building: failed to solve: error from sender: failed to match excludepatterns: syntax error in pattern

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions