Skip to content

Instantly share code, notes, and snippets.

View slemeur's full-sized avatar

Stévan Le Meur slemeur

View GitHub Profile
@slemeur
slemeur / source-dockerfile-url.json
Last active June 17, 2016 09:43
JSON - environment.machineConfigs[].source
"source": {
"type": "dockerfile",
"location": "http://beta.codenvy.com/api/recipe/recipec0v4ta2uz6jok0bn/script"
}
@slemeur
slemeur / source-dockerfile-content.json
Created June 17, 2016 09:43
JSON - environment.machineConfigs[].source
"source": {
"type": "dockerfile",
"content": "FROM codenvy/ubuntu_jdk8\nRUN echo hello world\nENV MYCUSTOM=VALUE"
}
@slemeur
slemeur / lifecycle-mapping-metadata.xml
Last active September 29, 2016 14:44
Eclipse IDE lifecycle-mapping-metadata.xml for Eclipse Che
<?xml version="1.0" encoding="UTF-8"?>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<versionRange>1.8</versionRange>
<goals>
<goal>run</goal>
@slemeur
slemeur / compose-recipe.yml
Created November 16, 2016 15:18
Sample Compose Recipe
services:
db:
image: codenvy/mysql // Base image
environment:
MYSQL_USER: petclinic
MYSQL_PASSWORD: password
mem_limit: 2147483648 // Memory used by the machine
command: [service, mysql, start] // Execute “service mysql start”
volumes_from: dev-machine // Share a volume mount from ‘dev-machine’
@slemeur
slemeur / using-chedir.sh
Created November 16, 2016 16:13
using-chedir
# Clone a source code repo that you want to convert into a workspace
git clone https://github.com/che-samples/web-java-spring-petclinic
cd web-java-spring-petclinic
# Convert it into a workspace running in a private Che server
che dir up
@slemeur
slemeur / che-mount.sh
Created November 16, 2016 16:22
use-chemount
mkdir sync
cd sync
che mount
@slemeur
slemeur / che-quick-start-5.0.sh
Last active January 11, 2017 16:59
che-quick-start-5.0
# Start Che with help:
docker run eclipse/che
# Start Che:
docker run -it -v /var/run/docker.sock:/var/run/docker.sock \
-v <LOCAL-PATH>:/data \
eclipse/che start
@slemeur
slemeur / che-cli-5.0.sh
Last active January 12, 2017 10:57
che-cli-5.0
# Start Che on Windows in C:\tmp:
docker run -it -v /var/run/docker.sock:/var/run/docker.sock
-v /c/tmp:/data
eclipse/che start
# Stop Che and remove user data from disk
docker run -it -v /var/run/docker.sock:/var/run/docker.sock
-v /c/tmp:/data
eclipse/che destroy
@slemeur
slemeur / che-compose-recipe.yml
Last active July 11, 2017 08:26
che-compose-recipe-5.0
services:
db:
image: codenvy/mysql // Base image
environment:
MYSQL_USER: petclinic
MYSQL_PASSWORD: password
mem_limit: 2147483648 // Memory used by the machine
command: [service, mysql, start] // Execute “service mysql start”
volumes_from:
- dev-machine // Share a volume mount from ‘dev-machine’
@slemeur
slemeur / che-snapshot-settings-5.0.sh
Created January 11, 2017 17:31
che-snapshot-settings-5.0
# During the stop of the workspace automatically creates a snapshot if the value is {true},
# Otherwise just stops the workspace.
CHE_WORKSPACE_AUTO__SNAPSHOT=false
# During the start of the workspace automatically restore it from a snapshot if the value is {true},
# Otherwise create a new workspace.
CHE_WORKSPACE_AUTO__RESTORE=false