{ "variables": { "base_container" : "{{ env `BASE_CONTAINER` }}", "docker_registry" : "{{ env `DOCKER_REGISTRY` }}", "container_name" : "{{ env `CONTAINER_NAME` }}", "build_number" : "{{ env `BUILD_NUMBER` }}" }, "builders": [ { "type" : "docker", "image" : "{{user `base_container`}}", "commit" : true, "changes" : [ "WORKDIR /example", "EXPOSE 8080", "ENTRYPOINT /usr/bin/java -jar -Dexample.docker /example/target/example.one-jar.jar" ] } ], "provisioners": [ { "type" : "shell", "inline" : [ "apt-get -y update", "apt-get install -y python-pip python-dev libssl-dev libffi-dev", "pip install ansible" ] }, { "type" : "ansible-local", "playbook_file" : "./ansible/docker-base.yml" }, { "type" : "file", "source" : "./", "destination" : "/example" }, { "type" : "shell", "inline" : [ "cd /example", "mvn dependency:sources", "mvn dependency:resolve -Dclassifier=javadoc", "mvn compile", "mvn package" ] } ], "post-processors": [ [ { "type" : "docker-tag", "repository" : "{{user `docker_registry`}}/{{user `container_name` }}", "tag" : "{{user `build_number`}}" } ] ] }