You have to install 2 plugins: Docker plugin and Docker Pipeline. Hope that helps.
Docker plugin
Docker Pipeline
instead ofagent {docker {image 'node:12.16.2'args '-p 3000:3000'}}
tryagent {any {image 'node:12.16.2'args '-p 3000:3000'}}
that worked for me.