Docker-py: ERROR: Cannot locate specified Dockerfile

Created on 14 Mar 2018  路  2Comments  路  Source: docker/docker-py

I'm not sure if this is a Docker Compose bug or docker-py bug, but this used to work:

docker-compose.yml:

version: '3.5'

services:
  php:
    build:
      context: .
      dockerfile: ./docker/php.Dockerfile

but now the ./ prefix is causing:

ERROR: Cannot locate specified Dockerfile: ./docker/php.Dockerfile

I have to change it to dockerfile: docker/php.Dockerfile to get it to work.

--

docker-py version: 3.1.1

Python 3.6.4

docker version:

Client:
 Version:   18.02.0-ce
 API version:   1.36
 Go version:    go1.9.4
 Git commit:    fc4de447b5
 Built: Tue Feb 13 15:28:01 2018
 OS/Arch:   linux/amd64
 Experimental:  false
 Orchestrator:  swarm

Server:
 Engine:
  Version:  18.02.0-ce
  API version:  1.36 (minimum version 1.12)
  Go version:   go1.9.4
  Git commit:   fc4de447b5
  Built:    Tue Feb 13 15:28:34 2018
  OS/Arch:  linux/amd64
  Experimental: false

OS: Manjaro Linux 17.1.6

kinbug

Most helpful comment

Is there any chance of this making it into docker-compose 1.20 so as not to cause havoc for potentially many people? (We at https://github.com/api-platform/api-platform are definitely affected.)

All 2 comments

Thanks for the report!

Is there any chance of this making it into docker-compose 1.20 so as not to cause havoc for potentially many people? (We at https://github.com/api-platform/api-platform are definitely affected.)

Was this page helpful?
0 / 5 - 0 ratings