blob: 01adf9ae64359814d0ed82f1126ba1cc2824efac [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="keywords" content="installationdocker, docker, installation">
<title>Single-User&#58 Install on Docker | Eclipse Che Documentation</title>
<link rel="stylesheet" href="css/syntax.css">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" crossorigin="anonymous">
<!--<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">-->
<link rel="stylesheet" href="css/modern-business.css">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="css/customstyles.css">
<link rel="stylesheet" href="css/boxshadowproperties.css">
<!-- most color styles are extracted out to here -->
<link rel="stylesheet" href="css/theme-che.css">
<link rel="stylesheet" href="/css/coderay.css" media="screen" type="text/css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js" crossorigin="anonymous"></script>
<script src="js/jquery.navgoco.min.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Anchor.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/2.0.0/anchor.min.js" crossorigin="anonymous"></script>
<script src="js/toc.js"></script>
<script src="js/customscripts.js"></script>
<link rel="shortcut icon" href="che/docs/images/favicon.ico">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<link rel="alternate" type="application/rss+xml" title="che" href="http://0.0.0.0:4000/feed.xml">
<script>
$(document).ready(function() {
// Initialize navgoco with default options
$("#mysidebar").navgoco({
caretHtml: '',
accordion: true,
openClass: 'active', // open
save: false, // leave false or nav highlighting doesn't work right
cookie: {
name: 'navgoco',
expires: false,
path: '/'
},
slide: {
duration: 400,
easing: 'swing'
}
});
$("#collapseAll").click(function(e) {
e.preventDefault();
$("#mysidebar").navgoco('toggle', false);
});
$("#expandAll").click(function(e) {
e.preventDefault();
$("#mysidebar").navgoco('toggle', true);
});
});
</script>
<script>
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
</script>
<script>
$(document).ready(function() {
$("#tg-sb-link").click(function() {
$("#tg-sb-sidebar").toggle();
$("#tg-sb-content").toggleClass('col-md-9');
$("#tg-sb-content").toggleClass('col-md-12');
$("#tg-sb-icon").toggleClass('fa-toggle-on');
$("#tg-sb-icon").toggleClass('fa-toggle-off');
});
});
</script>
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-static-top">
<div class="container topnavlinks">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="fa fa-home fa-lg navbar-brand" href="index.html">&nbsp;<span class="projectTitle"> Eclipse Che Documentation</span></a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<!-- toggle sidebar button -->
<li><a id="tg-sb-link" href="#"><i id="tg-sb-icon" class="fa fa-toggle-on"></i> Nav</a></li>
<!-- entries without drop-downs appear here -->
<li><a href="https://medium.com/eclipse-che-blog/" target="_blank">Blog</a></li>
<li><a href="https://github.com/eclipse/che" target="_blank">Source Code</a></li>
<!-- entries with drop-downs appear here -->
<!-- conditional logic to control which topnav appears for the audience defined in the configuration file.-->
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Get Support<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="https://github.com/eclipse/che/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Akind%2Fbug" target="_blank">Known Bugs</a></li>
<li><a href="https://github.com/eclipse/che/issues/new" target="_blank">File an Issue</a></li>
<li><a href="https://stackoverflow.com/questions/tagged/eclipse-che" target="_blank">Che on StackOverflow</a></li>
</ul>
</li>
<!--
<li>
<a class="email" title="Submit feedback" href="#" onclick="javascript:window.location='mailto:?subject= feedback&body=I have some feedback about the Single-User&#58 Install on Docker page: ' + window.location.href;"><i class="fa fa-envelope-o"></i> Feedback</a>
</li>
-->
<!--comment out this block if you want to hide search-->
<li>
<!--start search-->
<div id="search-demo-container">
<input type="text" id="search-input" placeholder="search...">
<ul id="results-container"></ul>
</div>
<script src="js/jekyll-search.js" type="text/javascript"></script>
<script type="text/javascript">
SimpleJekyllSearch.init({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
dataSource: 'search.json',
searchResultTemplate: '<li><a href="{url}" title="Single-User&amp;#58 Install on Docker">{title}</a></li>',
noResultsText: 'No results found.',
limit: 10,
fuzzy: true,
})
</script>
<!--end search-->
</li>
</ul>
</div>
</div>
<!-- /.container -->
</nav>
<!-- Page Content -->
<div class="container">
<div id="main">
<!-- Content Row -->
<div class="row">
<!-- Sidebar Column -->
<div class="col-md-3" id="tg-sb-sidebar">
<ul id="mysidebar" class="nav">
<li class="sidebarTitle"> </li>
<li>
<a href="#">Overview</a>
<ul>
<li><a href="index.html">Introduction</a></li>
<li><a href="quick-start.html">Getting Started</a></li>
<li><a href="single-multi-user.html">Single and Multi-User Flavors</a></li>
<li><a href="infra-support.html">Supported Infrastructures</a></li>
</ul>
</li>
<li>
<a href="#">Che on Docker</a>
<ul>
<li class="active"><a href="docker-single-user.html">Docker - Single User</a></li>
<li><a href="docker-multi-user.html">Docker - Multi User</a></li>
<li><a href="docker-config.html">Docker - Configuration</a></li>
<li><a href="docker-cli.html">Docker - CLI Reference</a></li>
</ul>
</li>
<li>
<a href="#">Che on Kubernetes</a>
<ul>
<li><a href="kubernetes-single-user.html">Kubernetes - Single User</a></li>
<li><a href="kubernetes-multi-user.html">Kubernetes - Multi User</a></li>
<li><a href="kubernetes-config.html">Kubernetes - Configuration</a></li>
<li><a href="kubernetes-admin-guide.html">Kubernetes - Admin Guide</a></li>
</ul>
</li>
<li>
<a href="#">Che on OpenShift</a>
<ul>
<li><a href="openshift-single-user.html">OpenShift - Single User</a></li>
<li><a href="openshift-multi-user.html">OpenShift - Multi User</a></li>
<li><a href="openshift-config.html">OpenShift - Configuration</a></li>
<li><a href="openshift-admin-guide.html">OpenShift - Admin Guide</a></li>
</ul>
</li>
<li>
<a href="#">User Management</a>
<ul>
<li><a href="user-management.html">Authentication and Authorization</a></li>
<li><a href="authentication.html">Security Model</a></li>
<li><a href="permissions.html">Permissions</a></li>
<li><a href="organizations.html">Organizations in UD</a></li>
<li><a href="resource-management.html">Resource Management</a></li>
</ul>
</li>
<li>
<a href="#">User Guides</a>
<ul>
<li><a href="creating-starting-workspaces.html">Creating and starting Workspaces</a></li>
<li><a href="ide-projects.html">Projects</a></li>
<li><a href="editor-code-assistance.html">Editor and Code-Assistance</a></li>
<li><a href="dependency-management.html">Dependency Management</a></li>
<li><a href="commands-ide-macro.html">Commands and IDE Macros</a></li>
<li><a href="version-control.html">Version Control</a></li>
<li><a href="debug.html">Debug</a></li>
</ul>
</li>
<li>
<a href="#">Workspace Administration</a>
<ul>
<li><a href="what-are-workspaces.html">Workspace Overview</a></li>
<li><a href="stacks.html">Workspace - Stacks</a></li>
<li><a href="recipes.html">Workspace - Recipes</a></li>
<li><a href="servers.html">Workspace - Servers</a></li>
<li><a href="installers.html">Workspace - Installers</a></li>
<li><a href="volumes.html">Workspace - Volumes Mount</a></li>
<li><a href="env-variables.html">Workspace - Environment Variables</a></li>
<li><a href="projects.html">Workspace - Projects</a></li>
<li><a href="workspaces-troubleshooting.html">Workspace - Troubleshooting</a></li>
<li><a href="workspace-data-model.html">Workspace Data Model</a></li>
</ul>
</li>
<li>
<a href="#">Portable Workspaces</a>
<ul>
<li><a href="chedir-getting-started.html">Chedir - Getting Started</a></li>
<li><a href="why-chedir.html">Chedir - Why Chedir?</a></li>
<li><a href="chedir-installation.html">Chedir - Installation</a></li>
<li><a href="chedir-project-setup.html">Chedir - Project Setup</a></li>
<li><a href="chedir-up-and-down.html">Chedir - Up and Down</a></li>
<li><a href="chefile.html">Chedir - Chefile</a></li>
<li><a href="chedir-ssh.html">Chedir - SSH</a></li>
<li><a href="factories-getting-started.html">Factory - Getting Started</a></li>
<li><a href="creating-factories.html">Factory - Creating</a></li>
<li><a href="factories_json_reference.html">Factory - JSON Reference</a></li>
</ul>
</li>
<li>
<a href="#">Developer Guides</a>
<ul>
<li><a href="framework-overview.html">Overview</a></li>
<li><a href="rest-api.html">SDK - REST API</a></li>
<li><a href="che-in-che-quickstart.html">SDK - Your First Plugin</a></li>
<li><a href="build-reqs.html">SDK - Building Che</a></li>
<li><a href="assemblies.html">SDK - Assemblies</a></li>
<li><a href="logging.html">SDK - Logging</a></li>
<li><a href="ide-extensions-gwt.html">SDK - GWT IDE Extensions</a></li>
<li><a href="server-side-extensions.html">SDK - Server Side Extensions</a></li>
<li><a href="custom-installers.html">SDK - Installers</a></li>
<li><a href="project-types.html">SDK - Project Types</a></li>
<li><a href="language-servers.html">SDK - Language Support</a></li>
<li><a href="parts.html">IDE UI&#58 Parts</a></li>
<li><a href="actions.html">IDE UI&#58 Actions</a></li>
</ul>
</li>
<li>
<a href="#">Dev Essentials</a>
<ul>
<li><a href="guice.html">Dependency Injection</a></li>
<li><a href="dto.html">Transport&#58 DTO</a></li>
<li><a href="json-rpc.html">Communication&#58 JSON-RPC</a></li>
<li><a href="handling-projects-in-plugins.html">Handling Projects in Plugins</a></li>
<li><a href="dao.html">Persistence, DAO</a></li>
<li><a href="properties.html">Properties</a></li>
</ul>
</li>
<li>
<a href="#">Infrastructure and SPI</a>
<ul>
<li><a href="spi_overview.html">Overview</a></li>
<li><a href="spi-implementation.html">Implementation Notes</a></li>
</ul>
</li>
<!-- if you aren't using the accordion, uncomment this block:
<p class="external">
<a href="#" id="collapseAll">Collapse All</a> | <a href="#" id="expandAll">Expand All</a>
</p>
-->
</ul>
<!-- this highlights the active parent class in the navgoco sidebar. this is critical so that the parent expands when you're viewing a page. This must appear below the sidebar code above. Otherwise, if placed inside customscripts.js, the script runs before the sidebar code runs and the class never gets inserted.-->
<script>$("li.active").parents('li').toggleClass("active");</script>
</div>
<!-- Content Column -->
<div class="col-md-9" id="tg-sb-content">
<div class="post-header">
<h1 class="post-title-main">Single-User&#58 Install on Docker</h1>
</div>
<div class="post-content">
<!-- this handles the automatic toc. use ## for subheads to auto-generate the on-page minitoc. if you use html tags, you must supply an ID for the heading element in order for it to appear in the minitoc. -->
<script>
$( document ).ready(function() {
// Handler for .ready() called.
$('#toc').toc({ minimumHeaders: 0, listType: 'ul', showSpeed: 0, headers: 'h2' });
/* this offset helps account for the space taken up by the floating toolbar. */
$('#toc').on('click', 'a', function() {
var target = $(this.getAttribute('href'))
, scroll_target = target.offset().top
$(window).scrollTop(scroll_target - 10);
return false
})
});
</script>
<div id="toc"></div>
<!--
-->
<div class="sect1">
<h2 id="pre-requisites">Pre-Requisites</h2>
<div class="sectionbody">
<div class="ulist">
<ul>
<li>
<p>Docker 17+ recommended, ideally the <a href="http://docs.docker.com/engine/installation/">latest Docker version</a>. Even though Che may not have any issues with Docker 1.13+, all tests use Docker 17+.</p>
</li>
</ul>
</div>
<div class="listingblock">
<div class="content">
<pre>wget -qO- https://get.docker.com/ | sh</pre>
</div>
</div>
<div class="ulist">
<ul>
<li>
<p>OS: Linux, MacOS, Windows.</p>
</li>
</ul>
</div>
<div class="paragraph">
<p><strong>IMPORTANT!</strong></p>
</div>
<div class="paragraph">
<p>Mac-OS users need to create IP alias: <code>sudo ifconfig lo0 alias $IP</code> where <code>$IP</code> is IP that you get either in your Docker for Mac app <strong>Preferences &gt; Advanced &gt; Docker subnet</strong> or by running the following command:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>docker run --rm --net host eclipse/che-ip:nightly</pre>
</div>
</div>
<div class="ulist">
<ul>
<li>
<p>Min 1 CPU, 2GM RAM, 3GB disc space</p>
</li>
</ul>
</div>
<div class="paragraph">
<p>The default port required to run Che is <code>8080</code>. Che performs a preflight check when it boots to verify that the port is available. You can pass <code>-e CHE_PORT=&lt;port&gt;</code> in Docker portion of the start command to change the port that Che starts on.</p>
</div>
<div class="paragraph">
<p>Internal ports are ports within a local network. This is the most common scenario for most users when Che is installed on their local desktop/laptop. External ports are ports outside a local network. An example scenario of this would be a remote Che server on a cloud host provider. With either case ports need to be open and not blocked by firewalls or other applications already using the same ports.</p>
</div>
<div class="paragraph">
<p>All ports are TCP unless otherwise noted.</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 34%;">
<col style="width: 33%;">
<col style="width: 33%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Port &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;</th>
<th class="tableblock halign-left valign-top">Service &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;</th>
<th class="tableblock halign-left valign-top">Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">8080</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Tomcat Port</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Che server default port</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">8000</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Server Debug Port</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Users developing Che extensions and custom assemblies would use this debug port to connect a remote debugger to Che server.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">32768-65535</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Docker and Che Agents</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Users who launch servers in their workspace bind to ephemeral ports in this range. This range can be limited.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect1">
<h2 id="known-issues">Known Issues</h2>
<div class="sectionbody">
<div class="paragraph">
<p>You can search Che’s GitHub issues for items labeled <code>kind/bug</code> to see <a href="https://github.com/eclipse/che/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Akind%2Fbug">known issues</a>.</p>
</div>
<div class="paragraph">
<p>There are two known issues where features work on Docker 1.13+, but do not on Docker 1.12:</p>
</div>
<div class="ulist">
<ul>
<li>
<p>SELinux: <a href="https://github.com/eclipse/che/issues/4747" class="bare">https://github.com/eclipse/che/issues/4747</a></p>
</li>
<li>
<p><code>CHE_DOCKER_ALWAYS<em>PULL</em>IMAGE</code>: <a href="https://github.com/eclipse/che/issues/5503" class="bare">https://github.com/eclipse/che/issues/5503</a></p>
</li>
</ul>
</div>
<div class="paragraph">
<p>Sometimes Fedora and RHEL/CentOS users will encounter issues with SElinux. Try disabling selinux with <code>setenforce 0</code> and check if resolves the issue. If using the latest docker version and/or disabling SElinux does not fix the issue then please file a issue request on the <a href="https://github.com/eclipse/che/issues">issues</a> page.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="quick-start">Quick Start</h2>
<div class="sectionbody">
<div class="listingblock">
<div class="content">
<pre># Interactive help. This command will fail by default but the CLI will print a prompt on how to proceed
docker run -it eclipse/che start
# Or, full start syntax where &lt;path&gt; is a local directory
docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v &lt;path&gt;:/data eclipse/che start
# Example output
$ docker run -ti -v /var/run/docker.sock:/var/run/docker.sock -v ~/Documents/che-data1:/data eclipse/che start
WARN: Bound 'eclipse/che' to 'eclipse/che:5.20.1'
INFO: (che cli): 5.20.1 - using docker 17.10.0-ce / native
WARN: Newer version '5.21.0' available
INFO: (che config): Generating che configuration...
INFO: (che config): Customizing docker-compose for running in a container
INFO: (che start): Preflight checks
mem (1.5 GiB): [OK]
disk (100 MB): [OK]
port 8080 (http): [AVAILABLE]
conn (browser =&gt; ws): [OK]
conn (server =&gt; ws): [OK]
INFO: (che start): Starting containers...
INFO: (che start): Services booting...
INFO: (che start): Server logs at "docker logs -f che"
INFO: (che start): Booted and reachable
INFO: (che start): Ver: 5.20.1
INFO: (che start): Use: http://172.19.20.180:8080
INFO: (che start): API: http://172.19.20.180:8080/swagger</pre>
</div>
</div>
<div class="paragraph">
<p>The Che CLI - a Docker image - manages the other Docker images and supporting utilities that Che uses during its configuration or operations phases. Che installation with the CLI is a recommended installation method, however it is possible to run <code>che-server</code> image directly. See: <a href="#run-without-cli">Run Che-Server directly</a>.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="versions">Versions</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Each version of Che is available as a Docker image tagged with a label that matches the version, such as <code>eclipse/che:6.0.0</code>. You can see all versions available by running <code>docker run eclipse/che version</code> or by <a href="https://hub.docker.com/r/eclipse/che/tags/">browsing DockerHub</a>.</p>
</div>
<div class="paragraph">
<p>We maintain "redirection" labels which reference special versions of Che:</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Variable</th>
<th class="tableblock halign-left valign-top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>latest</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The most recent stable release.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>6.0.0-latest</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The most recent stable release on the 6.x branch.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>nightly</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The nightly build.</p></td>
</tr>
</tbody>
</table>
<div class="paragraph">
<p>The software referenced by these labels can change over time. Since Docker will cache images locally, the <code>eclipse/che:&lt;version&gt;</code> image that you are running locally may not be current with the one cached on DockerHub. Additionally, the <code>eclipse/che:&lt;version&gt;</code> image that you are running references a manifest of Docker images that Che depends upon, which can also change if you are using these special redirection tags.</p>
</div>
<div class="paragraph">
<p>In the case of 'latest' images, when you initialize an installation using the CLI, we encode a <code>/instance/che.ver</code> file with the numbered version that latest references. If you begin using a CLI version that mismatches what was installed, you will be presented with an error.</p>
</div>
<div class="paragraph">
<p>To avoid issues that can appear from using 'nightly' or 'latest' redirections, you may:</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Verify that you have the most recent version with <code>docker pull eclipse/che:&lt;version&gt;</code>.</p>
</li>
<li>
<p>When running the CLI, commands that use other Docker images have an optional <code>--pull</code> and <code>--force</code> command line option <a href="https://hub.docker.com/r/eclipse/che/">which will instruct the CLI to check DockerHub</a> for a newer version and pull it down. Using these flags will slow down performance, but ensures that your local cache is current.</p>
</li>
</ol>
</div>
<div class="paragraph">
<p>If you are running Che using a tagged version that is a not a redirection label, such as <code>6.0.0</code>, then these caching issues will not happen, as the software installed is tagged and specific to that particular version, never changing over time.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="volume-mounts">Volume Mounts</h2>
<div class="sectionbody">
<div class="paragraph">
<p>We use volume mounts to configure certain parts of Che. The presence or absence of certain volume mounts will trigger certain behaviors in the system. For example, you can volume mount a Che source git repository with <code>:/repo</code> to use Che source code instead of the binaries and configuration that is shipped with our Docker images.</p>
</div>
<div class="paragraph">
<p>At a minimum, you must volume mount a local path to <code>:/data</code>, which will be the location that Che installs its configuration, user data, version and log information. Che also leaves behind a <code>cli.log</code> file in this location to debug any odd behaviors while running the system. In this folder we also create a <code>che.env</code> file which contains all of the admin configuration that you can set or override in a single location.</p>
</div>
<div class="paragraph">
<p>You can also use volume mounts to override the location of where your user or backup data is stored. By default, these folders will be created as sub-folders of the location that you mount to <code>:/data</code>. However, if you do not want your <code>/instance</code>, and <code>/backup</code> folder to be children, you can set them individually with separate overrides.</p>
</div>
<div class="listingblock">
<div class="content">
<pre>docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock
-v &lt;local-path&gt;:/data
-v &lt;a-different-path&gt;:/data/instance
-v &lt;another-path&gt;:/data/backup
eclipse/che:&lt;version&gt; [COMMAND]</pre>
</div>
</div>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 34%;">
<col style="width: 33%;">
<col style="width: 33%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Local Location</th>
<th class="tableblock halign-left valign-top">Container Location</th>
<th class="tableblock halign-left valign-top">Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>/var/run/docker.sock</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>/var/run/docker.sock</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">This is how Che gets access to Docker daemon. This instructs the container to use your local Docker daemon when Che wants to create its own containers.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>/&lt;your-path&gt;/lib</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>/data/lib</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Inside the container, we make a copy of important libraries that your workspaces will need and place them into <code>/lib</code>. When Che creates a workspace container, that container will be using your local Docker daemon and the Che workspace will look for these libraries in your local <code>/lib</code>. This is a tactic we use to get files from inside the container out onto your local host.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>/&lt;your-path&gt;/workspaces</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>/data/workspaces</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The location of your workspace and project files.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>/&lt;your-path&gt;/storage</code>  </p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>/data/storage</code>  </p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The location where Che stores the meta information that describes the various workspaces, projects and user preferences.  </p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect1">
<h2 id="hosting">Hosting</h2>
<div class="sectionbody">
<div class="paragraph">
<p>If you are hosting Che at a cloud service like DigitalOcean, AWS or Scaleways <code>CHE_HOST</code> must be set to the server public IP address or its DNS.</p>
</div>
<div class="paragraph">
<p>We will attempt to auto-set <code>CHE_HOST</code> by running an internal utility <code>docker run --net=host eclipse/che-ip:nightly</code>. This approach is not fool-proof. This utility is usually accurate on desktops, but usually fails on hosted servers. You can explicitly set this value to the IP address of your server:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock
-v &lt;local-path&gt;:/data
-e CHE_HOST=&lt;your-ip-or-host&gt;
eclipse/che:&lt;version&gt; [COMMAND]</pre>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="run-on-different-port">Run on Different Port</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Either set <code>CHE_PORT=$your_port</code> in <a href="docker-config.html#saving-configuration-in-version-control">che.env</a> or pass it as env in your docker run syntax: <code>-e CHE_PORT=$your_port</code>.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="run-as-user">Run As User</h2>
<div class="sectionbody">
<div class="paragraph">
<p>On Linux or Mac, you can run Eclipse Che container with a different user identity. The default is to run the Che container as root. You can pass <code>--user uid:gid</code> or <code>-e CHE_USER=uid:gid</code> as a <code>docker run</code> parameter before the <code>eclipse/che</code> Docker image. The CLI will start the <code>eclipse/che-server</code> image with the same <code>uid:gid</code> combination along with mounting <code>/etc/group</code> and <code>etc/passwd</code>. When Che is run as a custom user, all files written from within the Che server to the host (such as <code>che.env</code> or <code>cli.log</code> will be written to disk with the custom user as the owner of the files. This feature is not available on Windows.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="offline-installation">Offline Installation</h2>
<div class="sectionbody">
<div class="paragraph">
<p>We support offline (disconnected from the Internet) installation and operation. This is helpful for restricted environments, regulated datacenters, or offshore installations. The offline installation downloads the CLI, core system images, and any stack images while you are within a network DMZ with DockerHub access. You can then move those files to a secure environment and start Che.</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Save Che Images</p>
</li>
</ol>
</div>
<div class="paragraph">
<p>While connected to the Internet, download Che Docker images:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>docker run &lt;docker-goodness&gt; eclipse/che:&lt;version&gt; offline</pre>
</div>
</div>
<div class="paragraph">
<p>The CLI will download images and save them to <code>/backup/*.tar</code> with each image saved as its own file. You can save these files to a different location by volume mounting a local folder to <code>:/data/backup</code>. The version tag of the CLI Docker image will be used to determine which versions of dependent images to download. There is about 1GB of data that will be saved.</p>
</div>
<div class="paragraph">
<p>The default execution will download none of the optional stack images, which are needed to launch workspaces of a particular type. There are a few dozen stacks for different programming languages and some of them are over 1GB in size. It is unlikely that your users will need all of the stacks, so you do not need to download all of them. You can get a list of available stack images by running <code>eclipse/che offline --list</code>. You can download a specific stack by running <code>eclipse/che offline --image:&lt;image-name&gt;</code> and the <code>--image</code> flag can be repeatedly used on a single command line.</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Start Che In Offline Mode</p>
</li>
</ol>
</div>
<div class="paragraph">
<p>Place the TAR files into a folder in the offline computer. If the files are in placed in a folder named <code>/tmp/offline</code>, you can run Che in offline mode with:</p>
</div>
<div class="listingblock">
<div class="content">
<pre># Load the CLI
docker load &lt; /tmp/offline/eclipse_che:&lt;version&gt;.tar
# Start Che in offline mode
docker run &lt;other-properties&gt; -v /tmp/offline:/data/backup eclipse/che:&lt;version&gt; start --offline</pre>
</div>
</div>
<div class="paragraph">
<p>The <code>--offline</code> parameter instructs the Che CLI to load all of the TAR files located in the folder mounted to <code>/data/backup</code>. These images will then be used instead of routing out to the Internet to check for DockerHub. The preboot sequence takes place before any CLI functions make use of Docker. The <code>eclipse/che start</code>, <code>eclipse/che download</code>, and <code>eclipse/che init</code> commands support <code>--offline</code> mode which triggers this preboot sequence.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="upgrade">Upgrade</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Upgrading Che is done by downloading a <code>eclipse/che-cli:&lt;version&gt;</code> that is newer than the version you currently have installed. You can run <code>eclipse/che-cli version</code> to see the list of available versions that you can upgrade to.</p>
</div>
<div class="paragraph">
<p>For example, if you have 6.0.0 installed and want to upgrade to 6.0.1, then:</p>
</div>
<div class="listingblock">
<div class="content">
<pre># Get the new version of Che
docker pull eclipse/che-cli:6.0.0
# You now have two eclipse/che-cli images (one for each version)
# Perform an upgrade - use the new image to upgrade old installation
docker run &lt;volume-mounts&gt; eclipse/che-cli:6.0.1 upgrade</pre>
</div>
</div>
<div class="paragraph">
<p>The upgrade command has numerous checks to prevent you from upgrading Che if the new image and the old version are not compatible. In order for the upgrade procedure to advance, the CLI image must be newer that the version in <code>/instance/che.ver</code>.</p>
</div>
<div class="paragraph">
<p>The upgrade process:</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Performs a version compatibility check</p>
</li>
<li>
<p>Downloads new Docker images that are needed to run the new version of Che</p>
</li>
<li>
<p>Stops Che if it is currently running</p>
</li>
<li>
<p>Triggers a maintenance window</p>
</li>
<li>
<p>Backs up your installation</p>
</li>
<li>
<p>Initializes the new version</p>
</li>
<li>
<p>Starts Che</p>
</li>
<li>
<p>Important! If <code>CHE_PREDEFINED_STACKS_RELOAD<em>ON</em>START</code> is set to false, stacks packaged into new binaries will not be saved into a database.</p>
</li>
</ol>
</div>
</div>
</div>
<div class="sect1">
<h2 id="backup">Backup</h2>
<div class="sectionbody">
<div class="paragraph">
<p>You can run <code>che backup</code> to create a copy of the relevant configuration information, user data, projects, and workspaces. We do not save workspace snapshots as part of a routine backup exercise. You can run <code>che restore</code> to recover Che from a particular backup snapshot. The backup is saved as a TAR file that you can keep in your records. You can then use <code>che restore</code> to recover your user data and configuration.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="configuration">Configuration</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Che CLI allows a wide range of config changes to setup port, hostname, oAuth, Docker, git, and solve networking issues. See: <a href="docker-config.html">Che configuration on Docker</a>.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="run-without-cli">Run Without CLI</h2>
<div class="sectionbody">
<div class="paragraph">
<p>You can run the Che server directly by launching a Docker image. This approach bypasses the CLI, which has additional utilities to simplify administration and operation. The <code>eclipse/che-server</code> Docker image is appropriate for running Che within clusters, orchestrators, or by third party tools with automation.</p>
</div>
<div class="listingblock">
<div class="content">
<pre># Run the latest released version of Che
# Replace &lt;LOCAL_PATH&gt; with any host folder
# Che will place backup files there - configurable properties, workspaces, lib, storage
docker run -p 8080:8080 \
--name che \
--rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-v &lt;LOCAL_PATH&gt;:/data \
eclipse/che-server:6.0.0
# To run the nightly version of Che, replace eclipse/che-server:5.0.0-latest with
eclipse/che-server:nightly
# To run a specific tagged version of Che, replace eclipse/che-server:5.0.0-latest with
eclipse/che-server:&lt;version&gt;
# Stop the container running Che
docker stop che
# Restart the container running Che and restart the Che server
docker restart che
# Upgrade to a newer version
docker pull eclipse/che-server:6.0.0-latest
docker restart che</pre>
</div>
</div>
<div class="paragraph">
<p>Che has started when you see <code>Server startup in <mark>#</mark> ms</code>. After starting, Che is available at <code>localhost:8080</code> or a remote IP if Che has been started remotely.</p>
</div>
<div class="paragraph">
<p><strong>SELinux</strong></p>
</div>
<div class="paragraph">
<p>If SELinux is enabled, then run this instead:</p>
</div>
<div class="listingblock">
<div class="content">
<pre># Run the latest released version of Che
docker run -p 8080:8080 \
--name che \
-v /var/run/docker.sock:/var/run/docker.sock \
-v &lt;LOCAL_PATH&gt;:/data:Z \
--security-opt label:disable \
eclipse/che-server:6.0.0</pre>
</div>
</div>
<div class="paragraph">
<p><strong>Ports</strong></p>
</div>
<div class="paragraph">
<p>Tomcat inside the container will bind itself to port 8080 by default. You must map this port to be exposed in your container using <code>-p 8080:8080</code>. If you want to change the port at which your browsers connect, then change the first value, such as <code>p 9000:8080</code>. This will route requests from port 9000 to the internal Tomcat bound to port 8080. If you want to change the internal port that Tomcat is bound, you must update the port binding and set <code>CHE_PORT</code> to the new value.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="text">docker run -p 9000:9500 \
--name che \
-e CHE_PORT=9500 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v &lt;LOCAL_PATH&gt;:/data \
eclipse/che-server:6.0.0</code></pre>
</div>
</div>
<div class="paragraph">
<p><strong>Configuration</strong></p>
</div>
<div class="paragraph">
<p>Most important configuration properties are defined as environment variables that you pass into the container. For example, to have Che listen on port 9000:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>docker run -p:9000:9000 \
--name che \
-e CHE_SERVER_ACTION=stop \
-v /var/run/docker.sock:/var/run/docker.sock \
-v &lt;LOCAL_PATH&gt;:/data \
eclipse/che-server:6.0.0</pre>
</div>
</div>
<div class="paragraph">
<p>There are many variables that can be set.</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 34%;">
<col style="width: 33%;">
<col style="width: 33%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Variable</th>
<th class="tableblock halign-left valign-top">Description</th>
<th class="tableblock halign-left valign-top">Defaults</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>CHE_SERVER_ACTION</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The command to send to Tomcat. it can be [<code>run</code>, <code>start</code> , <code>stop</code>].</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>run</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>CHE_ASSEMBLY</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The path to a Che assembly that is on your host to be used instead of the assembly packaged within the <code>che-server</code> image. If you set this variable, you must also volume mount the same directory to <code>/home/user/che</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>/home/user/che</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>CHE_IN_VM</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Set to 'true' if this container is running inside of a VM providing Docker such as boot2docker, Docker for Mac, or Docker for Windows. We auto-detect this for most situations, but it’s not always perfect.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">auto-detection</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>CHE_LOG_LEVEL</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Logging level of output for Che server. Can be <code>debug</code> or <code>info</code>.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>info</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>CHE_HOST</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">IP address/hostname Che server will bind to. Used by browsers to contact workspaces. You must set this IP address if you want to bind the Che server to an external IP address that is not the same as Docker’s.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The IP address set to the Docker host. This does cover 99% of situations, but on rare occassions we are not able to discover this IP address and you must provide it.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>CHE_DEBUG_SERVER</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">If <code>true</code>, then will launch the Che server with JPDA activated so that you a Java debugger can attach to the Che server for debugging plugins, extensions, and core libraries.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>CHE_DEBUG_SERVER_PORT</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The port that the JPDA debugger will listen.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>8000</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>CHE_DEBUG_SERVER_SUSPEND</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">If <code>true</code>, then activates <code>JPDA_SUSPEND</code> flag for Tomcat running the Che server. Used for advanced internal debugging of extensions.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>false</code></p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>CHE_PORT</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The port the Che server will bind itself to within the Che container.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>8080</code></p></td>
</tr>
</tbody>
</table>
<div class="paragraph">
<p>You can find list of envs in <a href="https://github.com/eclipse/che/blob/master/dockerfiles/init/manifests/che.env">che.env</a>.</p>
</div>
<div class="paragraph">
<p>You can create a file with envs you want to pass to che-server:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>docker run -p:8080:8080 \
--name che \
-v /var/run/docker.sock:/var/run/docker.sock \
-v &lt;LOCAL_PATH&gt;:/data \
--env-file /home/user/che.env \
eclipse/che-server:6.0.0</pre>
</div>
</div>
<div class="paragraph">
<p><strong>Run Che on Public IP Address</strong></p>
</div>
<div class="paragraph">
<p>If you want to have remote browser clients connect to the Che server (as opposed to local browser clients) and override the defaults that we detect, set <code>CHE_IP</code> to the Docker host IP address that will have requests forwarded to the <code>che-server</code> container.</p>
</div>
<div class="paragraph">
<p>We run an auto-detection algorithm within the che-server container to determine this IP. If Docker is running on <code>boot2docker</code> this is usually the <code>eth1</code> interface. If you are running Docker for Windows or Docker for Mac this is usually the <code>eth0</code> interface. If you are running Docker natively on Linux, this is the <code>docker0</code> interface. If your host that is running Docker has its IP at 10.0.75.4 and you wanted to allow remote clients access to this container then:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>docker run -p:8080:8080 \
--name che \
-e CHE_HOST=10.0.75.4 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v &lt;LOCAL_PATH&gt;:/data \
eclipse/che-server:6.0.0</pre>
</div>
</div>
<div class="paragraph">
<p><strong>Run Che as a Daemon</strong></p>
</div>
<div class="paragraph">
<p>Pass the <code>--restart always</code> parameter to the docker syntax to have the Docker daemon restart the container on any exit event, including when your host is initially booting. You can also run Che in the background with the <code>-d</code> option.</p>
</div>
<div class="listingblock">
<div class="content">
<pre>docker run -p:8080:8080 \
--name che \
--restart always \
-e CHE_HOST=10.0.75.4 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v &lt;LOCAL_PATH&gt;:/data \
eclipse/che-server:6.0.0</pre>
</div>
</div>
<div class="paragraph">
<p><strong>Run With Docker Compose</strong></p>
</div>
<div class="listingblock">
<div class="content">
<pre class="CodeRay highlight"><code data-lang="yaml"><span class="key">che</span>:
<span class="key">image</span>: <span class="string"><span class="content">eclipse/che-server:6.0.0</span></span>
<span class="key">port</span>: <span class="string"><span class="content">8080:8080</span></span>
<span class="key">restart</span>: <span class="string"><span class="content">always</span></span>
<span class="key">volumes</span>:
- <span class="string"><span class="content">/var/run/docker.sock:/var/run/docker.sock</span></span>
- <span class="string"><span class="content">&lt;LOCAL_PATH&gt;:/data</span></span>
<span class="key">container_name</span>: <span class="string"><span class="content">che</span></span></code></pre>
</div>
</div>
<div class="paragraph">
<p>Save this into a file named <code>Composefile</code>. You can then run this with Docker Compose with <code>docker-compose -f Composefile -d --env-file=che.env</code>. Environment file should contain one must have env:</p>
</div>
<div class="listingblock">
<div class="content">
<pre># $IP is a public IP of your server
CHE_HOST=$IP</pre>
</div>
</div>
</div>
</div>
<div class="tags">
<b>Tags: </b>
<a href="tag_installation.html" class="btn btn-default navbar-btn cursorNorm" role="button">installation</a>
<a href="tag_docker.html" class="btn btn-default navbar-btn cursorNorm" role="button">docker</a>
</div>
<!--
-->
</div>
<hr class="shaded"/>
<footer>
<div class="row">
<div class="col-lg-12 footer">
Eclipse Che - Documentation <br/>
Site last generated: Sep 13, 2018 <br/>
<hr>
<a href="http://www.eclipse.org" target="_blank">Eclipse Foundation</a><br/>
<a href="http://www.eclipse.org/legal/privacy.php" target="_blank">Privacy Policy</a><br/>
<a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">Terms of Use</a><br/>
<a href="https://www.eclipse.org/legal/epl-2.0/" target="_blank">Eclipse Public License</a><br/>
<a href="http://www.eclipse.org/legal" target="_blank">Legal Resources</a><br/>
</div>
</div>
</footer>
<!-- /.row -->
</div>
<!-- /.container -->
</div>
<!-- /#main -->
</div>
</body>
</html>