Docker Community Forums

Share and learn in the Docker community.

Using a regex as volume source

(Philippe) #1

Hey all,

I am using docker compose to dockerize our tests.
I need to copy a war-file to the tomcat webapps folder in the container.
The war-file has a version number.

I tried the following:

    - ../app/target/*.war:/usr/local/tomcat/webapps/app.war

But the war-file does not get detected on the host.
Instead, an empty folder is created under webapps.

If I do not specify the war-file and copy everything from the target folder, Tomcat creates a context path using the version number like /app-2.16.0 but it needs to be just /app

Any ideas on how I can accomplish this?
Thank you in advance.