I was building a new GitHub Action today with a Dockerfile and got a strange error… `unable to prepare context: path “/action” not found.
I was using a Dockerfile in a sub directory, but the documentation indicates this is supported. So, what gives? Is it a mix-up of the file path? I’m testing it on Windows and can build the Dockerfile itself just fine 🤔. Tested with a backslash instead of a slash, but still an error:
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /path/to/Dockerfile
On a hunch (this has happened before!), I changed the file ending of the Dockerfile from CRLF into LF (created the file on Windows of-course!) and… 🎉.
# action.yml name: 'Octogotchi' description: 'Octogotchi' branding: icon : alert-circle color: blue runs: using: 'docker' image: 'action/Dockerfile'