0
votes

I am trying to build and deploy asp net core container app to heroku app using Github Actions. Due to some reason i am getting COPY failed error. Same DockerFile is working fine in my local.

Please find my docker file and github actions below.

Docker File, Workflow File, Action Logs

2

2 Answers

0
votes

The path you specified for .csproj is incorrect based on your github action workflow.

However, without making any further changes to the Dockerfile, if you change your Github Action workflow by setting the correct working-directory: src & dockerfile: 'Services/Core/MyFamilyManager.API/', it will fix your problem.

0
votes

Looks like there is no way to make it work with my solution folder structure. docker always uses DockerFile folder as context, so it will not be able to access my other parent folders.

I found a way by creating docker compose file at my root of my solution to build container image.

I have created and published Github action. I hope this will help others with similar issue.

https://github.com/marketplace/actions/deploy-multiple-docker-images-to-heroku-apps