I have a composer file:
version: '2'
services:
applic:
image: tomcat
ports:
- "8082:8080"
depends_on:
- rabbit_image
-packager
volumes:
- "/home/ustin/second_try/common_data:/home"
rabbit_image:
image: rabbitmq
ports:
- "15673:5672"
packager:
build:
context: ./maven_images
dockerfile: Dockerfile
volumes:
- "/home/ustin/second_try/common_data:/home"
and Dockerfile:
FROM maven
RUN mkdir clonefolder && cd clonefolder && git clone <repo.git> && cd docker-test-task && mvn clean package && cd target/ && cp docker-test-task-1.0.war /home && cd /home && ls
The main idea: using Dockerfile in image with maven i want to clone repo, create .war file using "clean package" command and lay it to "/home" folder, that before was defined as volume-folder and linked with "/home/ustin/second_try/common_data" on host-machine. At this moment i expect .war file on my host-machine. And then i want to get this .war to other image and lay this file into tomcat.
Question is: why i cannot find .war file not in my image in /home folder (but cp command was succesful), not in host-machine folder ? (ubuntu)
All steps - done: with re-build: http://prntscr.com/jrolk7 or cached: http://prntscr.com/jrolun