-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CHE-1039: add ability to bind additional folder to docker dev machine (…
…#1105) Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
- Loading branch information
Alexander Garagatyi
committed
Apr 21, 2016
1 parent
17a5b55
commit fd8c5f8
Showing
4 changed files
with
52 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...c/main/java/org/eclipse/che/plugin/docker/machine/local/provider/ExtraVolumeProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2012-2016 Codenvy, S.A. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Codenvy, S.A. - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.che.plugin.docker.machine.local.provider; | ||
|
||
import com.google.inject.Inject; | ||
|
||
import javax.inject.Named; | ||
import javax.inject.Provider; | ||
import javax.inject.Singleton; | ||
|
||
/** | ||
* Provides volume configuration of machine for any local directories | ||
* that a user may want to mount into a dev machine. | ||
* <br/>machine.server.extra.volume property is optional and provided as | ||
* /path/on/host:/path/in/container | ||
* | ||
* @author Alexander Garagatyi | ||
*/ | ||
@Singleton | ||
public class ExtraVolumeProvider implements Provider<String> { | ||
@Inject(optional = true) | ||
@Named("machine.server.extra.volume") | ||
private String volume; | ||
|
||
@Override | ||
public String get() { | ||
return volume == null ? "" : volume; | ||
} | ||
} |