After installing the docker in the pipeline, it fixed the issue before. But now it says that there is no dockerfile matching.
I have try different path where the dockerfile is located at but the error has not been solved.
- task: Docker@2
displayName : Login to Docker Hub
inputs:
command: login
containerRegistry: Docker_Hub #fypproject #dockerRegistryServiceConnection1 #
- task: DockerInstaller@0
displayName: Docker Installer
inputs:
dockerVersion: 17.09.0-ce
releaseType: stable
- task: Docker@2
displayName: Build and Push
inputs:
command: buildAndPush
repository: max/newimage # username/contosoRepository for DockerHub
#$dockerfile: /workspaces/FYP_Project/.devcontainer/Dockerfile
dockerfile: /workspaces/FYP_Project/.devcontainer/Dockerfile
#env:
# PATH: /vscode/bin/linux-x64/695af097c7bd098fbf017ce3ac85e09bbc5dda06/bin/remote-cli:/usr/local/sdkman/bin:/usr/local/sdkman/candidates/java/current/bin:/usr/local/sdkman/candidates/gradle/current/bin:/usr/local/sdkman/candidates/maven/current/bin:/usr/local/sdkman/candidates/ant/current/bin:/usr/local/dotnet/current:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/vscode/.dotnet/tools:/home/vscode/.local/bin
#PATH: /workspaces/FYP_Project/.devcontainer/Dockerfile
According to the documentation, It should be:
Dockerfile: /workspaces/FYP_Project/.devcontainer/Dockerfile
Notice the uppercase D
.