[solved] Publish docker plugin: file entry is not being used

Hi,

I just started exploring Drone CI today, so I’m really new to this. BTW, great project, thank you for working on this.

I have a project with multiple folders and Dockerfile. I’m trying to publish multiple images to a private docker registry and I keep running to a problem where my docker file is not found. By reading the docs I thought that specifying file would be sufficient but it does not help. Also I tried specifying context as part of the docker plugin configuration and also did not work.

my .drone.yml

pipeline:
  build:
    image: kkarczmarczyk/node-yarn:6.9-slim
    commands:
      - cd server
      - yarn install
      - cd ..
      - cd index
      - yarn install
      - cd ..
      - cd ui
      - yarn install
      - yarn test
      - cd ..
  docker:
    image: plugins/docker
    registry: MY_URL:5000
    repo: MY_URL:5000/my-concept/index
    insecure: true
    file: ./index/Dockerfile
    tag:
      - latest
      - "0.1.0"
    when:
      branch: master
  docker:
    image: plugins/docker
    registry: MY_URL:5000
    repo: MY_URL:5000/my-concept/server
    insecure: true
    file: ./server/Dockerfile
    tag:
      - latest
      - "0.1.0"
    when:
      branch: master

This is the output I get:

+ /usr/local/bin/docker daemon -g /var/lib/docker --insecure-registry MY_URL:5000
0s
2
Registry credentials not provided. Guest mode enabled.
1s
3
+ /usr/local/bin/docker version
1s
4
Client:
1s
5
 Version:      1.13.0
1s
6
 API version:  1.25
1s
7
 Go version:   go1.7.3
1s
8
 Git commit:   49bf474
1s
9
 Built:        Wed Jan 18 16:20:26 2017
1s
10
 OS/Arch:      linux/amd64
1s
12
Server:
1s
13
 Version:      1.13.0
1s
14
 API version:  1.25 (minimum version 1.12)
1s
15
 Go version:   go1.7.3
1s
16
 Git commit:   49bf474
1s
17
 Built:        Wed Jan 18 16:20:26 2017
1s
18
 OS/Arch:      linux/amd64
1s
19
 Experimental: false
1s
20
+ /usr/local/bin/docker info
1s
21
Containers: 0
1s
22
 Running: 0
1s
23
 Paused: 0
1s
24
 Stopped: 0
1s
25
Images: 0
1s
26
Server Version: 1.13.0
1s
27
Storage Driver: overlay2
1s
28
 Backing Filesystem: extfs
1s
29
 Supports d_type: true
1s
30
 Native Overlay Diff: false
1s
31
Logging Driver: json-file
1s
32
Cgroup Driver: cgroupfs
1s
33
Plugins: 
1s
34
 Volume: local
1s
35
 Network: bridge host macvlan null overlay
1s
36
Swarm: inactive
1s
37
Runtimes: runc
1s
38
Default Runtime: runc
1s
39
Init Binary: docker-init
1s
40
containerd version: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e
1s
41
WARNING: bridge-nf-call-iptables is disabled
1s
42
WARNING: bridge-nf-call-ip6tables is disabled
1s
43
runc version: 2f7393a47307a16f8cee44a37b262e8b81021e3e
1s
44
init version: 949e6fa
1s
45
Security Options:
1s
46
 seccomp
1s
47
  Profile: default
1s
48
Kernel Version: 4.7.3-coreos-r2
1s
49
Operating System: Alpine Linux v3.5 (containerized)
1s
50
OSType: linux
1s
51
Architecture: x86_64
1s
52
CPUs: 24
1s
53
Total Memory: 15.6 GiB
1s
54
Name: 839cbfaffd50
1s
55
ID: D66I:YPVA:LTJ5:TBED:QO2A:NWZS:5LQP:UVOV:K26T:XXG5:Y3QS:KH4Z
1s
56
Docker Root Dir: /var/lib/docker
1s
57
Debug Mode (client): false
1s
58
Debug Mode (server): false
1s
59
Registry: https://index.docker.io/v1/
1s
60
Experimental: false
1s
61
Insecure Registries:
1s
62
 MY_URL:5000
1s
63
 127.0.0.0/8
1s
64
Live Restore Enabled: false
1s
65
+ /usr/local/bin/docker build --pull=true --rm=true -f Dockerfile -t a599751ad29ba4daefbe8290cafa317a4ed61ffe .
1s
66
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /drone/src/github.hpe.com/UNCLE/uncle-concept/Dockerfile: no such file or directory
1s
67
exit status 1

As you can see in the logs, docker build is still passing -f Dockerfile. Any idea how to fix this?

it should be dockerfile instead of file. Here is the link for the most recent documentation:

http://plugins.drone.io/drone-plugins/drone-docker/