Skip to content
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

docs: Change use of "Name" to "Path" in dockerfile option information #11

Closed
matthewfeickert opened this issue Mar 18, 2020 · 2 comments · Fixed by #16
Closed

docs: Change use of "Name" to "Path" in dockerfile option information #11

matthewfeickert opened this issue Mar 18, 2020 · 2 comments · Fixed by #16
Assignees

Comments

@matthewfeickert
Copy link

matthewfeickert commented Mar 18, 2020

Hi. Thanks very much for making this GitHub Action!

I'd like to suggest that in the dockerfile option the text

Name of the Dockerfile

be changed to

Path to the Dockerfile relative to path.

When I first read the docs I got confused by the use of "path" and "name" (instead of "context" and "path") and for a directory that structure that is structured with

$ tree
.
├── other_files_needed_for_build
├── docker
│   └── Dockerfile

attempted to use

    - name: Build and Publish to Registry
      uses: docker/build-push-action@v1
      with:
        username: ${{ secrets.DOCKER_USERNAME }}
        password: ${{ secrets.DOCKER_PASSWORD }}
        repository: org/repo-name
        path: docker
        dockerfile: Dockerfile

instead of the following (correct)

    - name: Build and Publish to Registry
      uses: docker/build-push-action@v1
      with:
        username: ${{ secrets.DOCKER_USERNAME }}
        password: ${{ secrets.DOCKER_PASSWORD }}
        repository: org/repo-name
        dockerfile: docker/Dockerfile

I think the use of "path" would be more clear than "name". If you agree with me I have a branch with this change on my fork that I can open a PR here on (though telling me to do so might involve more typing).

@zappy-shu zappy-shu self-assigned this Mar 20, 2020
@zappy-shu
Copy link
Contributor

zappy-shu commented Mar 20, 2020

Hi @matthewfeickert. Thanks for your feedback.

The README is wrong, the dockerfile path is not changed by the path input. I will make a correction if the dockerfile input is set.

The path input is relate to the PATH argument in the docker build CLI command while dockerfile relates to the --file option.

Setting the path changes the context as described here: https://docs.docker.com/engine/reference/commandline/build/

@matthewfeickert
Copy link
Author

Thanks very much, @zappy-shu. I took a look at PR #16 and that seems to perfectly clarify things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants