Plugins/docker workspace.base availability

Hi,

I#m currently trying to build and containerize my app using docker which works to a certain degree, that is building the app itself. But moving my executable into the docker task seems to be impossible at this stage.
Setup:

workspace:
  base: /app....

Code get compiled to /app/build/web and then:

  container:
   image: plugins/docker
   repo: [...]
   tag: latest
   dockerfile: WebApp/Dockerfile

Dockerfile:

[...]
COPY /app/build/web /var/www
[...]

Results in:

COPY failed: stat /var/lib/docker/tmp/docker-builder322485274/app/build/web: no such file or directory
time="2018-05-01T20:33:48Z" level=fatal msg="exit status 1"

/app/build/web does exist but seems to be completely inaccessible from the docker plugin. So I’m just wondering if my diagnosis is accurate or if there is actually a way to access /app.

We do exactly this for almost every Drone repository (drone/drone, drone/drone-cli, drone/autoscaler and all of our plugins). I recommend taking a look at one of these repositories and comparing to your current configuration (Dockerfile, .drone.yml, etc)

I’m not really familiar with go’s directory structure so I can’t really tell where release is located but anyway shouldn’t /app or /go in your example be available in any plugin ?

I think perhaps the issue is that you are using absolute filepaths, and in our configuration we use relative filepaths. Note that the Docker plugin uses the root of your github repository (e.g. where the .git folder is located) as the current working directory.