-
Notifications
You must be signed in to change notification settings - Fork 644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exporting base dir as volume by default uses unnecessary disk space #164
Comments
also using a maven property "docker. exportBaseDir" would be nice so folks can enable/disable it in a root pom.xml easily. |
At least the property already exists: |
Ah OK! Didn't see that - thanks. |
Rereading the docs I have to confess that I probably completely misunderstood Docker's volumes concept when I implemented this feature. I thought that Also, the initial use case was to create a data container holding the artefacts which are mounted by appserver containers which deploy artefacts during startup. For this scenario, exporting For the other scenario, where a base image with the runtime context is used, an export doesn't make sense at all and can be quite harmful. My suggestion is to make the default dependent on whether a If there are no objections, I will
|
That sounds great to me. Thanks @rhuss |
@rhuss thanks! |
Renamed `exportBase` to `exportBaseDir` (#164) and added missing properties to documentation.
Issue 68 - Windows build path issue
Data in Docker volumes are copied to a host dir when a container is started. This can lead to wasted disk space & create problems if there are a large number of containers running from maven plugin created images.
As an example, I had an image created with 67MB of JARs in /maven. /maven was marked as a volume in the image. When running a container from this image, the JARs were copied to a directory under
/var/lib/docker/vfs/dir/<CONTAINER_ID>/...
which led to 67MB of disk usage per container. When running 1000s of containers this actually lead to out of disk space issues.Perhaps defaulting
exportBaseDir
to false would make sense? It's nice be able to use the base dir as a volume for development, but the drawbacks for production usage should be noted.The text was updated successfully, but these errors were encountered: