Skip to content

Commit

Permalink
Continue work on #1895
Browse files Browse the repository at this point in the history
- Introduce Chefile data with generation and parsing : Allow to customize port number and workspace name for now
- Introduce logger to get same kind of logs than with che-launcher
- Fix documentation
- Improve sh scripts to generate nightly or latest or be started from any directory

Change-Id: I6da278cf1724fbb5a50526a7555e3059477e80fb
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
  • Loading branch information
benoitf committed Aug 3, 2016
1 parent 7293ea4 commit ef1e127
Show file tree
Hide file tree
Showing 15 changed files with 373 additions and 85 deletions.
2 changes: 1 addition & 1 deletion dockerfiles/che-file/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# To use:
# `docker run -v /var/run/docker.sock:/var/run/docker.sock \
# -v "$PWD":"$PWD" --rm codenvy/che-file \
# /bin/che $PWD <init|up>`
# $PWD <init|up>`
#
# where [COMMAND]:
# init -- Initialize configuration files for this directory
Expand Down
3 changes: 2 additions & 1 deletion dockerfiles/che-file/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Run script
```
docker run -v /var/run/docker.sock:/var/run/docker.sock \
-v "$PWD":"$PWD" --rm codenvy/che-file \
/bin/che $PWD <init|up>
$PWD <init|up>
```

note: if Eclipse Che is already started, it does not handle yet this state
11 changes: 9 additions & 2 deletions dockerfiles/che-file/build-docker-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html

if [ "latest" = "$1" ]
then
TAG="latest"
else
TAG="nightly"
fi

DIR=$(cd "$(dirname "$0")"; cd ..; pwd)
echo "Building Docker Image from $DIR directory"
cd $DIR && docker build -t codenvy/che-file -f che-file/Dockerfile .
echo "Building Docker Image from $DIR directory with tag $TAG"
cd $DIR && docker build -t codenvy/che-file:$TAG -f che-file/Dockerfile .
11 changes: 9 additions & 2 deletions dockerfiles/che-test/build-docker-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html

if [ "latest" = "$1" ]
then
TAG="latest"
else
TAG="nightly"
fi

DIR=$(cd "$(dirname "$0")"; cd ..; pwd)
echo "Building Docker Image from $DIR directory"
cd $DIR && docker build -t codenvy/che-test -f che-test/Dockerfile .
echo "Building Docker Image from $DIR directory with tag $TAG"
cd $DIR && docker build -t codenvy/che-test:$TAG -f che-test/Dockerfile .
3 changes: 3 additions & 0 deletions dockerfiles/lib/typescript/incremental-compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html

DIR=$(cd "$(dirname "$0")"; pwd)
echo "Compiling from $DIR directory"
cd $DIR
docker run --rm -v $(pwd):/usr/src/app -w /usr/src/app node:6 /bin/bash -c "/usr/src/app/dependencies/compile/node_modules/typescript/bin/tsc --outDir /usr/src/app/lib /usr/src/app/src/index.ts && groupadd user && useradd -g user user && (chown --silent -R user.user /usr/src/app || true)"

if [ $? -eq 0 ]; then
Expand Down
Loading

0 comments on commit ef1e127

Please sign in to comment.