Q:

which plugin or pre-installation are need to dockerize build on jenkins?

which plugin or pre-installation are need to dockerize build on jenkins?
I keep having this stupid stack !
WorkflowScript: 74: Expected a symbol @ line 74, column 15.
             docker.image('maven:3.3.3-jdk-8').inside("-v  $PWD:/data")     {
             ^

WorkflowScript: 74: "error" should have 1 arguments but has 2 arguments     instead. @ line 74, column 15.
             docker.image('maven:3.3.3-jdk-8').inside("-v  $PWD:/data") {

Edit : I have the docker pipeline plugin installed
the full jenkinsfile
stage('docker') {
       steps {
          checkout scm
          docker.image('maven:3.3.3-jdk-8').inside("-v  $PWD:/data") {
            writeFile file: 'settings.xml', text: "<settings><localRepository>${pwd()}/.m2repo</localRepository></settings>"
            sh 'mvn clean install'

          }
 }

A:

Mostly scripted/declarative pipeline are mixed.
docker.image is scripted pipeline, see https://jenkins.io/doc/book/pipeline/docker/, therefore it needs to be wrapped with script {} inside declarative pipeline.
Here are two working sample, with jenkins slave dockerserver
Scripted pipeline

node("dockerserver") {
    stage('docker') {
        docker.image('maven:3.3.3-jdk-8').inside("-v  $PWD:/data") {
            writeFile file: 'settings.xml', text: "${pwd()}/.m2repo"
            sh 'ls'
        }
    }
}

Declarative pipeline:

pipeline {
    agent { label "dockerserver" }
    stages {
        stage('docker') {
            steps {
                script {    
                    docker.image('maven:3.3.3-jdk-8').inside("-v  $PWD:/data") {
                        writeFile file: 'settings.xml', text: "${pwd()}/.m2repo"
                        sh 'ls'
                    }
                }
            }
        }
    }
}

A:

You can see a similar error in issue JENKINS-44749

It seems the problem is deeper than I though since the Docker Pipeline Plugin also fails but with the following message:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 46: Expected a symbol @ line 46, column 25.
docker.image(‘node:7-alpine’).inside {

After reinstalling all plugins and updating Jenkins to 2.64 the original error is gone but I still get the error from the above comment.
Wrapping docker.image in a script block makes it work, but it wasn't needed before.

        steps {
            script {
                docker.image('maven:3.3.3-jdk-8').inside("-v  $PWD:/data") {
                    writeFile file: 'settings.xml', text: "<settings><localRepository>${pwd()}/.m2repo</localRepository></settings>"
                    sh 'mvn clean install'
                } 
            }
        }

