drone-docker icon indicating copy to clipboard operation
drone-docker copied to clipboard

Default ´dockerfile´ value is wrong

Open JoelLinn opened this issue 4 years ago • 0 comments

The default value for the -f flag of docker build is PATH/Dockerfile. However, this plugin uses just Dockerfile as default: https://github.com/drone-plugins/drone-docker/blob/f08821b02496bfa8814d688523e170156050128f/cmd/drone-docker/main.go#L111-L115

For this reason one needs to explicitly set the dockerfile when using a non default context (PATH), for example:

settings:
  context: 5.6/buster/cli
  dockerfile: 5.6/buster/cli/Dockerfile

Otherwise, this error will be thrown:

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

JoelLinn avatar Oct 12 '21 22:10 JoelLinn