che-server/dockerfiles/che/Dockerfile.centos

47 lines
1.7 KiB
Docker

# 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 current folder after executing build.sh:
# `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 \
CHE_IN_CONTAINER=true
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 && \
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
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
ADD eclipse-che.tar.gz /home/user/