No examples of `path` or `dockerfile` options
See original GitHub issueI’m working on a project that has multiple Dockerfile
s, each of them in a separate directory. One of those is named api
, so the dockerfile is in api/Dockerfile
. I have the following in my workflow:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/build-push-action@v1
with:
path: api
username: companyusername
password: companypassword
repository: company/myproject/api
registry: companyregistry
tags: latest
I get the following error:
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /github/workspace/api/Dockerfile: no such file or directory
However, I see the checkout
action logging the following:
Initializing the repository
/usr/bin/git init /home/runner/work/myproject/myproject
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
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:25 (5 by maintainers)
Top Results From Across the Web
Best practices for writing Dockerfiles - Docker Documentation
Best practices for writing Dockerfiles. This document covers recommended best practices and methods for building efficient images.
Read more >How do I build a dockerfile if the name of the ... - Stack Overflow
The last parameter to docker build is the build path, ... No files are created in the process, no source is changed. ......
Read more >Build an Image - Specify Dockerfile Location · Codefresh | Docs
Sometimes you have a project where the Dockerfile is not in the root folder of the ... The dockerfile property of the build...
Read more >Customize the Docker extension - Visual Studio Code
All common features of Visual Studio Code tasks (for example, ... A Node.js based Docker image with no specific platform options can just...
Read more >docker-build - Build a new image from the source code at PATH
The build is run by the Docker daemon, not by the CLI, so the whole context must be ... OPTIONS. -f, --file=PATH/Dockerfile Path...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the following
And it works.
Make sure you have a
Dockerfile
in the root of the project, double-check that.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.