0

I'm facing a problem since I migrate from Docker Toolbox for windows to Docker Desktop as the old one is now deprecated and not in development.

I created a new Liferay 7.2 workspace and generated a sample mvc portlet module and I'm trying to create a docker container as described in the Help Center. So I did not customize any stuff in Liferay until now, I just try to see how an image would be generated.

I executed the gradle task createDockerContainer and everything went ok until such final step where I got the error below:

...
Step 7/7 : COPY --chown=liferay:liferay 100_liferay_image_setup.sh /usr/local/liferay/scripts/pre-configure/100_liferay_image_setup.sh

Successfully built 18zsebqz71b
Successfully tagged sample-project:7.2.1-ga2
Created image with ID '18zsebqz71b'.

> Task :createDockerContainer FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':createDockerContainer'.
> {"message":"invalid volume specification: '/run/desktop/mnt/host/d/workspaces/sample-project/build/docker/deploy:rw'"}

I have my doubts about windows paths...

My configuration :

  • Docker desktop 2.4.0
  • Liferay 7.2.1-ga2
  • WSL2 enabled
  • WINDOWS 10 HOME (2004)
  • Liferay Gradle workspace plugin 3.0.11
  • gradle properties plugin 1.4.6

Thanks for your help !

javaxiss
  • 680
  • 3
  • 13
  • 34

1 Answers1

0

I faced the same problem and fixed it following the instructions below from https://liferay.dev/blogs/-/blogs/local-work-with-dxp-cloud:

Q2: Error message

What went wrong: Execution failed for task ':createDockerContainer'. {"message":"invalid volume specification: '/host_mnt/d/repos/private/lctgelesis/liferay/build/docker/deploy:rw'"} A2: Update your Workspace version to at least 3.3.2. If you are using a newly generated workspace, this should not be an issue.

In gradle.settings, update the version number of “com.liferay.gradle.plugins.workspace” to version 3.3.2

Dharman
  • 30,962
  • 25
  • 85
  • 135
Jordi
  • 1