Skip to content

Commit 8431141

Browse files
author
Roman Iuvshin
committed
update dockerfiles
1 parent 4aa3f4e commit 8431141

File tree

5 files changed

+115
-2
lines changed

5 files changed

+115
-2
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ test-output/
2323
*.exe
2424
*.o
2525
*.so
26-
*.sh
26+
2727

2828
# Packages #
2929
############
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
# Copyright (c) 2012-2016 Codenvy, S.A., Red Hat, Inc
3+
# All rights reserved. This program and the accompanying materials
4+
# are made available under the terms of the Eclipse Public License v1.0
5+
# which accompanies this distribution, and is available at
6+
# http://www.eclipse.org/legal/epl-v10.html
7+
8+
if [ "latest" = "$1" ]
9+
then
10+
TAG="latest"
11+
else
12+
TAG="nightly"
13+
fi
14+
15+
DIR=$(cd "$(dirname "$0")"; cd ..; pwd)
16+
echo "Building Docker Image from $DIR directory with tag $TAG"
17+
cd $DIR && docker build -t codenvy/che-file:$TAG -f che-file/Dockerfile .

dockerfiles/che-file/src/che.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ org.everrest.asynchronous.cache.size=1024
148148
# Path to asynchronous service
149149
org.everrest.asynchronous.service.path=/async/
150150

151-
machine.ssh.connection_timeout_ms=3000
151+
machine.ssh.connection_timeout_ms=10000
152152
# The location of the Web Socket terminal used within the browser.
153153
# This is copied into the machine and run from within it.
154154
# Suffix helps differentiate archive for different architectures/OSes

dockerfiles/che-mount/sync.sh

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
#!/bin/sh
2+
# Copyright (c) 2012-2016 Codenvy, S.A., Red Hat, Inc
3+
# All rights reserved. This program and the accompanying materials
4+
# are made available under the terms of the Eclipse Public License v1.0
5+
# which accompanies this distribution, and is available at
6+
# http://www.eclipse.org/legal/epl-v10.html
7+
#
8+
# Contributors:
9+
# Tyler Jewell - Initial implementation
10+
#
11+
init_logging() {
12+
BLUE='\033[1;34m'
13+
GREEN='\033[0;32m'
14+
RED='\033[0;31m'
15+
NC='\033[0m'
16+
}
17+
18+
init_global_variables() {
19+
20+
USAGE="
21+
Usage:
22+
docker run --rm -it --cap-add SYS_ADMIN --device /dev/fuse
23+
-v <local-mount>/:/mnthost codenvy/che-mount <ip> <port>
24+
<local-mount> Host directory to sync files, must end with a slash '/'
25+
<ip> IP address of Che server
26+
<port> Port of workspace SSH server - retrieve inside workspace
27+
"
28+
}
29+
30+
parse_command_line () {
31+
if [ $# -eq 0 ]; then
32+
usage
33+
exit
34+
fi
35+
}
36+
37+
usage () {
38+
printf "%s" "${USAGE}"
39+
}
40+
41+
info() {
42+
printf "${GREEN}INFO:${NC} %s\n" "${1}"
43+
}
44+
45+
debug() {
46+
printf "${BLUE}DEBUG:${NC} %s\n" "${1}"
47+
}
48+
49+
error() {
50+
printf "${RED}ERROR:${NC} %s\n" "${1}"
51+
}
52+
53+
error_exit() {
54+
echo "---------------------------------------"
55+
error "!!!"
56+
error "!!! ${1}"
57+
error "!!!"
58+
echo "---------------------------------------"
59+
exit 1
60+
}
61+
62+
# See: https://sipb.mit.edu/doc/safe-shell/
63+
set -e
64+
set -u
65+
66+
init_logging
67+
init_global_variables
68+
parse_command_line "$@"
69+
70+
sshfs user@$1:/projects /mntssh -p $2
71+
unison /mntssh /mnthost -batch -fat -silent -auto -prefer=newer > /dev/null 2>&1
72+
73+
info "INFO: ECLIPSE CHE: Successfully mounted user@$1:/projects"
74+
75+
while :
76+
do
77+
unison /mntssh /mnthost -batch -fat -silent -auto -prefer=newer > /dev/null 2>&1
78+
sleep 1
79+
done
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
# Copyright (c) 2012-2016 Codenvy, S.A., Red Hat, Inc
3+
# All rights reserved. This program and the accompanying materials
4+
# are made available under the terms of the Eclipse Public License v1.0
5+
# which accompanies this distribution, and is available at
6+
# http://www.eclipse.org/legal/epl-v10.html
7+
8+
if [ "latest" = "$1" ]
9+
then
10+
TAG="latest"
11+
else
12+
TAG="nightly"
13+
fi
14+
15+
DIR=$(cd "$(dirname "$0")"; cd ..; pwd)
16+
echo "Building Docker Image from $DIR directory with tag $TAG"
17+
cd $DIR && docker build -t codenvy/che-test:$TAG -f che-test/Dockerfile .

0 commit comments

Comments
 (0)