Fly deploy via Github Actions fails - Rails 8 - Sqlite

When deploying on GH Actions we get this error. Everything from local fly deploy works just fine.

Error: failed to fetch an image or build from source: error building: failed to solve: process "/bin/sh -c groupadd --system --gid 1000 rails && useradd rails --uid 1000 --gid 1000 --create-home --shell /bin/bash && mkdir /data && chown -R 1000:1000 db log storage tmp /data" did not complete successfully: exit code: 1

Not that this is helpful, but this makes no sense.

groupadd, useradd, mkdir, and chown are vanilla Linux commands. There is no reason why they should fail. Particularly if the same Dockerfile builds with fly deploy.

In general when one has a long concatenated command of this kind, there is value in splitting it into separate lines in the GHA config, or making a helper script, and then running the helper.

Could you post your YAML so we can see the commands in context, Dan?

1 Like

Those lines look like they came from our dockerfile generator: