Dockerfile not found

Hello,

I am trying to set up a github action to deploy my app to dev/prod environments, based on the branch name on commit and everything seems fine, except that the Dockerfile (which is in the root of my project) cannot be found.

That’s my github action:

name: Fly Deploy
on:
    push:
        branches:
            - main
            - dev
env:
    FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
jobs:
    deploy:
        name: Deploy app
        runs-on: ubuntu-latest
        steps:
            -   uses: actions/checkout@v3
            -   uses: superfly/flyctl-actions/setup-flyctl@master
            -   name: deploy to PROD
                if: github.ref == 'refs/heads/master'
                run: |
                    echo "deploying BE to PROD"
                    flyctl deploy -a my-app --remote-only

            -   uses: actions/checkout@v3
            -   uses: superfly/flyctl-actions/setup-flyctl@master
            -   name: deploy to DEV
                if: github.ref == 'refs/heads/dev'
                run: |
                    echo "deploying BE to DEV"
                    flyctl deploy -a my-app-dev --remote-only

The error I’m getting is the following:

Error: failed to fetch an image or build from source: error building: failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /data/docker/tmp/buildkit-mount129862266/Dockerfile: no such file or directory

Any help would be greatly appreciated.

This is similar issue i’ve been facing in: Github action deployment fails - #4 by billy

Still no resolution :confused:

I’ve reread the docs and the forum and multiple people use the exact same setup as me and it’s working in their case.

Does someone have any idea how to solve this problem?

The problem was caused by the slashes in the .dockerignore file, because I’m using Windows locally and the builder is using Linux… had to change all backward slashes to forward ones.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.