0

Use Case

  1. The code that I wish to edit in che is downloaded from a private SVN repository and uses a private nexus repository for maven dependencies. Due to this I need to use my custom settings.xml from "C:\Users\.m2".
  2. It would be good to use the local maven repository too, hence the approach of creating a custom dockerfile that adds settings.xml was not used.

Setup

I created a user environment variable "CHE_EXTRA_VOLUME_MOUNT" with the value "~/.m2:/home/user/.m2". I can see the env variable from "Docker Quickstart Terminal".

Environment
  1. OS: Windows 7
  2. Docker version: 1.12.6, build 78d1802
  3. Docker image: eclipse/che-server:5.0.0

Problem

Can't see the mount path "/home/user/.m2" in any workspace.

Can someone please help me with this use case?

Ajay
  • 68
  • 6

2 Answers2

1

I see a couple issues. First, in the che.env file, you should be modifying CHE_WORKSPACE_VOLUME. The CHE_EXTRA_VOLUME_MOUNT is an older name that applied to the 4.x releases.

Second, the mount path you are using. The value that you provided on the mount path is likely not going to work well if it's on Windows 7. This is because you are using Boot2Docker on that system, and so VirtualBox limits files that can be mounted to those that exist as a subfolder of %userprofile%.

So: 1. First make sure that c:\Users\.m2 is part of this subfolder, and then: 2. Use the absolute path to your .m2 folder in the mount in the che.env:

CHE_WORKSPACE_VOLUME=/C/Users/<user_name>/.m2:/home/user/.m2 This funky path naming for volume mounts is a limitation in how the Docker client can understand volume mounts if you are using it on the batch shell.

A matching answer is posted on Che's support site - https://github.com/eclipse/che/issues/3888

Tyler Jewell
  • 151
  • 5
0

Looks like it is a bug in eclipse che. You can create an issue at https://github.com/eclipse/che/issues

gaal
  • 148
  • 1
  • 5