You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the following configuration, the image build fails with error [creator] Error: /workspace already exists and is not empty and removes the content of the /datadog host directory.
Note that when not activating the BP_JVM_CDS_ENABLED, it works fine.
<configuration>
<image>
<builder>paketobuildpacks/builder-jammy-buildpackless-tiny</builder>
<buildpacks>
<buildpack>paketobuildpacks/java</buildpack>
</buildpacks>
<bindings>
<!-- WARN: bindings to /workspace doesnt work and it removes your host files -->
<binding>${project.basedir}/datadog:/workspace/datadog</binding>
<!-- <binding>${project.basedir}/datadog:/platform/bindings/datadog</binding>-->
</bindings>
<env>
<BP_JVM_CDS_ENABLED>true</BP_JVM_CDS_ENABLED>
<BP_SPRING_AOT_ENABLED>true</BP_SPRING_AOT_ENABLED>
</env>
</image>
</configuration>
Possible Solution
I found later in the docs that the recommended configuration with binding is using instead /platform/bindings path instead of /workspace , so maybe the buildpack should fail mentioning that the configuration is wrong.
@pivotal-david-osullivan and @dmikusa , I had a look at what @yhgillet described, and it turns out that, due to the way we unzip / rezip the workspace during CDS processing, it clashes when the user binds a volume in /workspace.
I'm not sure what's best: prevent (or discourage via warning messages) the users not to mount their bindings under workspaces, or, change the CDS processing so that it does disrupt the workspace too much.
The
removes the content of the /datadog host directory.
got me worried 😧 (I could reproduce everything described by @yhgillet )
When using the following configuration, the image build fails with error
[creator] Error: /workspace already exists and is not empty
and removes the content of the /datadog host directory.Note that when not activating the
BP_JVM_CDS_ENABLED
, it works fine.Possible Solution
I found later in the docs that the recommended configuration with binding is using instead
/platform/bindings
path instead of /workspace , so maybe the buildpack should fail mentioning that the configuration is wrong.Steps to Reproduce
This repo can be used to reproduce
calling
mvn clean install
shows the issueThe text was updated successfully, but these errors were encountered: