kitchen-docker_cli icon indicating copy to clipboard operation
kitchen-docker_cli copied to clipboard

When `build_context` set to true, cannot use custom Dockerfile

Open xmik opened this issue 9 years ago • 0 comments

The problem is, that when I set in .kitchen.yml:

platforms:
  - name: ubuntu
    transport:
      name: docker_cli
    driver:
      name: docker_cli
    driver_config:
      build_context: true
      dockerfile: DockerfileUbuntu

and then run kitchen converge, I get error:

STDERR: unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /some/path/to/Dockerfile: no such file or directory

Note that the path in error is to Dockerfile, while it should be to DockerfileUbuntu. The docker build command needs a path to Dockerfile, while now the Dockerfile contents is sent in this way: https://github.com/marcy-terui/kitchen-docker_cli/blob/master/lib/kitchen/driver/docker_cli.rb#L87 .

I'll send a PR with a fix idea in 5 minutes.

xmik avatar Sep 01 '16 10:09 xmik