-
Notifications
You must be signed in to change notification settings - Fork 558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No examples of path
or dockerfile
options
#51
Comments
@bobvanderlinden use |
I now have the following:
and I'm still seeing:
|
I have the following
And it works. Make sure you have a |
Your example doesn't have a path nor a dockerfile option. My project doesn't have a Dockerfile on the root of the repository, which is why I was forced to use the path option. |
Got the same issue as @bobvanderlinden, looks like path option doesn't work at all. |
Alright, I get it now. Examples
|
I'm seeing a similar issue with the following:
My Dockerfile is located at
Any ideas what I'm missing? |
@bobvanderlinden |
@sau00 Thanks for your comment as well. It helped me validate what I was testing. |
If that works for you I have to revisit my example again, something must be wrong on my side of things. |
Here's what I got working as a test. Hopefully it helps. Repo is obviously fake, but everything else is real.
|
Similar issue, but not sure how to resolve it... Directory structure is: The build context needs to be set to /root/src/, running from a command line would be something along the lines of: or from the root: docker build -f "./src/projecta/Dockerfile" "./src". How can I represent this structure, as it seems the path is completely ignored.. |
Hi, This will be solved through build-push-action v2 (#92) as it's written as a typescript-action to be as closed as possible of the GitHub Runner during its execution. You can already try it with: |
Version 2 has been merged to the main branch and is therefore available via As a reminder, this new version changes drastically and works with 3 new actions (login, setup-buildx and setup-qemu) that we have created. Many usage examples have been added to handle most use cases. And it should fix this current issue. Don't hesitate if you have any questions. |
That looks good! Thanks a lot 👍 |
We're still seeing the same error, even with - uses: docker/setup-buildx-action@v1
- uses: docker/build-push-action@v2
with:
context: ./path/to/context
tags: docker/image/name:latest Result:
I have verified that our |
OK, so our mistake was that - uses: docker/build-push-action@v2
with:
context: ./path/to/context
file: ./path/to/context/Dockerfile
tags: docker/image/name:latest It would be nice to document it more explicitly :) |
We have this same issue in our workflow. And I think the documentation is not entirely clear. If you have to specify a context path, be sure to add a step with the check out action.
|
@guumaster See #189 |
@crazy-max thanks. but I think is not the same issue. No matter what you put on |
Sorry that's this one: #120 (comment). See also Git context and Path context. |
@crazy-max that's the one. And you are rigth that it is in the docs, but it seems clear once you already had the issue. Is it a good idea to add this info in the |
@guumaster Sure feel free to open a PR. |
@guumaster thanks to your suggestion I finally go out from a nightmare buildx on github action |
I'm working on a project that has multiple
Dockerfile
s, each of them in a separate directory. One of those is namedapi
, so the dockerfile is inapi/Dockerfile
. I have the following in my workflow:I get the following error:
However, I see the
checkout
action logging the following:From the documentation it is unclear that I should be using some variable to determine
/home/runner/work/myproject/myproject
instead of/github/workspace/
. What am I doing wrong?I also tried using
dockerfile:
, but also with the same results: always relative to/github/workspace
.The text was updated successfully, but these errors were encountered: