Unable to finding the option to set docker workspace option when running the docker image

I have installed docker build step plugin in jenkins. Using that plugin trying to compile java application using maven image.

In docker build step options, I am unable to find the option to setup the working directory.

  • Docker unreachable after computer sleep
  • If an marathon app running in a docker image, is in 'deploying' state, where can we check the reason why the app isn't deploying?
  • Docker Conditional build image
  • Docker. Run software with license based on host id
  • MySQL import hangs on Vagrant CoreOS box on Mac
  • How to see a linked container as localhost?
  • docker run -v /usr/src:/work -w /work maven:latest mvn package

    Above command works fine while running via shell.

    Same logic trying to achive using jenkins docker build step plugin. I can see bind the volume, but can’t see the working directory option. Anyone please suggest

  • docker install and enable php extension
  • Docker in docker on AWS Elastic Beanstalk
  • Docker Quickstart Terminal: exit status 255
  • pyftpdlib Networkprotocol Error
  • Storing secret env variables as separate data container in Docker
  • Behat, MySql Connection error in Laravel5 : 'PDOException''SQLSTATE[HY000] [2005] Unknown MySQL server host 'mysql' (2)'
  • One Solution collect form web for “Unable to finding the option to set docker workspace option when running the docker image”

    Would an option be to use the -onbuild Maven image variant? It has WORKDIR set in the Dockerfile: https://github.com/carlossg/docker-maven/blob/ecf54b9839caed8aa2bcf9b8f7bb19594634ee89/jdk-8/onbuild/Dockerfile. In this case you would just mount /usr/src:/usr/src/app instead of /work.

    If the default mvn install doesn’t work for you (mvn install should includ the package goal) you could always build your own base image that included a custom WORKDIR.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.