You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DockerV2 task push command implementation relies on Dockerfile existence
Although Dockerfile input is used, it is not available in Designer for push command since visibility is: command = build || command = buildAndPush
Which leads to inability to use push command at all, forcing to use V1 or buildAndPush instead.
Task logs
Unhandled: No Dockerfile matching /home/vsts/work/r1/a//Dockerfile was found.
Unhandled: No Dockerfile matching /home/vsts/work/r1/a//Dockerfile was found.
Suggestion
Docker push should not rely on Dockerfile at all. That's a must.
But task needs to publish deployment metadata to the TeamFoundationCollection URL, it wants to know the base image name. It is not possible to get base image name from the docker image itself.
Also, it is kind of bad design to rely on one base image, since many and many projects use multi-stage builds, hence multiple base images sequentially. But it could be a different topic.
Option 1: Use LABEL (my preference)
Instead of getting base image on the push command, it is wise to retrieve it where we build such container. So, I would keep current logic, but use BUILD task for it instead, adding LABEL with base image information.
Then, in PUSH, I would get base image name using docket image inspect command. No label? Use "unknown" placeholder. Easy-peasy.
Option 2: Provide access to the Dockerfile configuration
So our artifacts should contain Dockerfile and we should be able to provide its path in push command, solved by updating visibility command. But still, leaves Dockerfile requirement and forces to create artifact for it.
Option 3: Remove push command
Since it is now useful in any kind of way right now
The text was updated successfully, but these errors were encountered:
@SebAubin, You can either use buildAndPush command or use docker v1 task till push command is fixed. @ajinkya599 should be able to fix the push command early next week in docker v2.
Required Information
Question, Bug, or Feature?
Type: Bug
Enter Task Name: Docker
Issue Description
Which leads to inability to use push command at all, forcing to use V1 or buildAndPush instead.
Task logs
Unhandled: No Dockerfile matching /home/vsts/work/r1/a//Dockerfile was found.
Unhandled: No Dockerfile matching /home/vsts/work/r1/a//Dockerfile was found.
Suggestion
Docker push should not rely on Dockerfile at all. That's a must.
But task needs to publish deployment metadata to the TeamFoundationCollection URL, it wants to know the base image name. It is not possible to get base image name from the docker image itself.
Also, it is kind of bad design to rely on one base image, since many and many projects use multi-stage builds, hence multiple base images sequentially. But it could be a different topic.
Option 1: Use LABEL (my preference)
Instead of getting base image on the push command, it is wise to retrieve it where we build such container. So, I would keep current logic, but use BUILD task for it instead, adding LABEL with base image information.
Then, in PUSH, I would get base image name using docket image inspect command. No label? Use "unknown" placeholder. Easy-peasy.
Option 2: Provide access to the Dockerfile configuration
So our artifacts should contain Dockerfile and we should be able to provide its path in push command, solved by updating visibility command. But still, leaves Dockerfile requirement and forces to create artifact for it.
Option 3: Remove push command
Since it is now useful in any kind of way right now
The text was updated successfully, but these errors were encountered: