user1025852
user1025852

Reputation: 2784

how to get maven artifacts to be available to Dockerfile COPY phase

my ansible.yml

- maven_artifact: 
    group_id=some.group
    artifact_id=tagger
    extension=zip                
    repository_url=some_url

- name: Build tagger in command line
    command: docker build -t tagger:1.0 path.to.docker.fil

my Dockerfile

ADD tagger.zip  /tmp/tagger.zip

the error is lstat file not found (didn't see any dockerfile.ignore around)

lstat ./tagger.zip: no such file or directory

I see that the artifact is getting by default to root, added also "dest" to maven step - in short - where does ansible waits for stuff in his "COPY" phase? is there some intermediate folder in /tmp? how I can link those two steps

Upvotes: 0

Views: 277

Answers (1)

michael_bitard
michael_bitard

Reputation: 4212

You have to copy the maven artifact inside the docker build path

add dest=path.to.docker.file in your maven_artifact section

Upvotes: 1

Related Questions