When using Concourse v8, you may observe that the "dir" property is not working as expected within a concourse task. For example, with a job like so:
jobs:
- name: pwd-demo-job
plan:
- get: pcf-image
params:
unpack: true
- get: pcf-repo
- task: create-and-pwd
image: pcf-image
config:
inputs:
- name: pcf-repo
platform: linux
run:
dir: pcf-repo
path: pwd
In Concourse v7, the output would be like so:
/tmp/build/34da35b2/pcf-repo
However, in Concourse v8 it shows:
/
Concourse v8
This is caused by running the guardian container runtime in Concourse v8. Starting in Concourse v8.0, the default runtime was changed to containerd.
You can validate what runtime you are using by SSH-ing to the Concourse worker VM, and running ps aux | grep -E "gdn|containerd".
If you are using Concourse v8 and the guardian runtime, you must be forcing it to do so in your concourse operations file:
Either remove the operations file, or update it like so to ensure it uses containerd:
- type: replace
path: /instance_groups/name=worker/jobs/name=worker/properties?/runtime?
value: containerd