forked from eclipse-che/che
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.centos
53 lines (46 loc) · 1.83 KB
/
Dockerfile.centos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright (c) 2012-2016 Red Hat, Inc
# 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:
# Dharmit Shah - Initial implementation
# Mario Loriedo - Improvements
#
# To build it, run in the repository root:
# `docker build -t registry.centos.org/eclipse/che-server -f Dockerfile.centos .`
#
# To run it:
# docker run --net=host \
# --name che \
# -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 \
# registry.centos.org/eclipse/che-server
#
FROM registry.centos.org/centos/centos:latest
ENV LANG=C.UTF-8 \
JAVA_HOME=/usr/lib/jvm/jre-1.8.0 \
PATH=${PATH}:${JAVA_HOME}/bin \
CHE_HOME=/home/user/che \
DOCKER_VERSION=1.6.0 \
DOCKER_BUCKET=get.docker.com
RUN yum -y update && \
yum -y install openssl java sudo && \
curl -sSL "https://${DOCKER_BUCKET}/builds/Linux/x86_64/docker-${DOCKER_VERSION}" -o /usr/bin/docker && \
chmod +x /usr/bin/docker && \
yum -y remove openssl && \
yum clean all
RUN useradd user -d /home/user -s /bin/bash -u 1000 -G root && \
groupadd docker -g 101 && \
usermod -aG ftp,users,docker user && \
echo "%root ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
sed -i 's/Defaults requiretty/#Defaults requiretty/g' /etc/sudoers && \
rm -rf /tmp/* /var/cache/yum
EXPOSE 8000 8080
USER user
ADD assembly/assembly-main/target/eclipse-che-*/eclipse-che-* /home/user/che/
ENTRYPOINT [ "/home/user/che/bin/che.sh", "-c" ]
CMD [ "run" ]