Skip to content

Instantly share code, notes, and snippets.

View TylerJewell's full-sized avatar

Tyler Jewell TylerJewell

View GitHub Profile
@TylerJewell
TylerJewell / che-launcher.sh
Last active December 9, 2016 16:07
Che Launcher Syntax
docker run --rm -t -v /var/run/docker.sock:/var/run/docker.sock eclipse/che [COMMAND]
# WHERE COMMAND IS:
start # Starts Che server
stop # Stops Che server
restart # Restarts Che server
update # Pulls latest version of Che image (upgrade)
info # Print debugging information
@TylerJewell
TylerJewell / che-server.sh
Last active October 8, 2016 18:57
Che Docker Container - Complex Syntax
# Run the Che container with:
docker run --net=host \
--name che \
--restart always \
-p 9001:8080 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /home/user/che/lib:/home/user/che/lib-copy \
-v /home/user/che/workspaces:/home/user/che/workspaces \
-v /home/user/che/storage:/home/user/che/storage \
-v /local:/container \
@TylerJewell
TylerJewell / che-server.sh
Last active October 8, 2016 18:57
Start Che with Docker
# Run the latest released version of Che
docker run --net=host \
--name che \
-v /var/run/docker.sock:/var/run/docker.sock:Z \
-v /home/user/che/lib:/home/user/che/lib-copy:Z \
-v /home/user/che/workspaces:/home/user/che/workspaces:Z \
-v /home/user/che/storage:/home/user/che/storage:Z \
codenvy/che-server
FROM alpine:3.4
ENV LANG=C.UTF-8 \
JAVA_HOME=/usr/lib/jvm/default-jvm/jre \
PATH=${PATH}:${JAVA_HOME}/bin \
CHE_HOME=/home/user/che
RUN echo "http://dl-4.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
apk upgrade --update && \
apk add --update ca-certificates curl openssl openjdk8 sudo bash && \
che start
INFO: ECLIPSE CHE: Found image eclipse/che-server:nightly
INFO: ECLIPSE CHE: Starting container...
INFO: ECLIPSE CHE: Server logs at "docker logs -f che-server"
INFO: ECLIPSE CHE: Server booting...
INFO: ECLIPSE CHE: Booted and reachable
INFO: ECLIPSE CHE: Ver: 5.0.0-M3-SNAPSHOT
INFO: ECLIPSE CHE: Use: http://10.0.75.2:7000
INFO: ECLIPSE CHE: API: http://10.0.75.2:7000/swagger
#!/bin/sh
# 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:
# Tyler Jewell - Initial Implementation
#
# 2-way fast-sync a running workspace with local directory
$ che mount
INFO: ECLIPSE CHE: Successfully mounted [email protected]:/projects
$ docker run --rm -t -v /var/run/docker.sock:/var/run/docker.sock \
-e CHE_DATA_FOLDER=/c/Users/tyler eclipse/che start
INFO: ECLIPSE CHE: Found image eclipse/che-server:nightly
INFO: ECLIPSE CHE: Starting container...
INFO: ECLIPSE CHE: Server logs at "docker logs -f che-server"
INFO: ECLIPSE CHE: Server booting...
INFO: ECLIPSE CHE: Booted and reachable
INFO: ECLIPSE CHE: Ver: 5.0.0-M3-SNAPSHOT
INFO: ECLIPSE CHE: Use: http://10.0.75.2:7000
$ git clone http://github.com/<repo>
$ cd <repo>
# Generates a new Che workspace with the contents of the current directory
# Starts a Che server if one cannot be found
$ che up
$ che start
$ che stop
$ che restart
$ che info
$ che update