From 2b827a2be9a4e8efbe2e1d0cbacd59660d11300c Mon Sep 17 00:00:00 2001 From: Sergii Kabashniuk Date: Thu, 26 Oct 2017 15:38:51 +0300 Subject: [PATCH] fixup! Initial centos image --- dockerfiles/dev/.cccp.yml | 13 +++++++ dockerfiles/dev/Dockerfile | 30 +++++++++++++--- dockerfiles/dev/contrib/settings.xml | 51 ++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+), 4 deletions(-) create mode 100644 dockerfiles/dev/.cccp.yml create mode 100644 dockerfiles/dev/contrib/settings.xml diff --git a/dockerfiles/dev/.cccp.yml b/dockerfiles/dev/.cccp.yml new file mode 100644 index 0000000000..6e87112e9a --- /dev/null +++ b/dockerfiles/dev/.cccp.yml @@ -0,0 +1,13 @@ +# Copyright (c) 2012-2017 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 + +# This is file is needed to include the project in the CentOS Container +# Pipeline main index. It can be used to set the image name (using job-id), set +# the test script and/or build script and whether to perform or skip the +# user-defined tests. More information on cccp.yml file can be found on: +# https://github.com/CentOS/container-index#the-cccpyml-file + +job-id: che-dev diff --git a/dockerfiles/dev/Dockerfile b/dockerfiles/dev/Dockerfile index eacbe39a60..02e3f87c09 100644 --- a/dockerfiles/dev/Dockerfile +++ b/dockerfiles/dev/Dockerfile @@ -8,10 +8,21 @@ # Red Hat, Inc.- initial API and implementation -FROM eclipse/centos_jdk8 +FROM registry.centos.org/che-stacks/centos-stack-base +EXPOSE 4403 8080 8000 9876 22 + +LABEL che:server:8080:ref=tomcat8 che:server:8080:protocol=http che:server:8000:ref=tomcat8-debug che:server:8000:protocol=http che:server:9876:ref=codeserver che:server:9876:protocol=http + +ENV M2_HOME=/opt/rh/rh-maven35/root/usr/share/maven \ + TOMCAT_HOME=/home/user/tomcat8 \ + TERM=xterm +ENV PATH=$M2_HOME/bin:$PATH -RUN sudo yum -y install \ + +RUN sudo yum -y update && \ + sudo yum -y install \ + rh-maven35 \ rh-nodejs6 \ gcc-c++ \ gcc \ @@ -19,11 +30,22 @@ RUN sudo yum -y install \ make \ golang \ sudo yum clean all && \ + cat /opt/rh/rh-maven35/enable >> /home/user/.bashrc &&\ cat /opt/rh/rh-nodejs6/enable >> /home/user/.bashrc +USER user - -ENV GOPATH=$HOME/go \ +ENV MAVEN_OPTS=$JAVA_OPTS\ + GOPATH=$HOME/go \ PATH=$GOPATH/bin:/usr/local/go/bin:$PATH +RUN mkdir $HOME/.m2 && \ + mkdir /home/user/tomcat8 && \ + wget -qO- "http://archive.apache.org/tomcat/tomcat-8/v8.5.23/bin/apache-tomcat-8.5.23.tar.gz" | tar -zx --strip-components=1 -C /home/user/tomcat8 && \ + rm -rf /home/user/tomcat8/webapps/* && \ + echo "export MAVEN_OPTS=\$JAVA_OPTS" >> /home/user/.bashrc + +ADD ./contrib/settings.xml $HOME/.m2/settings.xml + + WORKDIR /projects/ \ No newline at end of file diff --git a/dockerfiles/dev/contrib/settings.xml b/dockerfiles/dev/contrib/settings.xml new file mode 100644 index 0000000000..d4478ffd62 --- /dev/null +++ b/dockerfiles/dev/contrib/settings.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + securecentral + + + central + https://repo1.maven.org/maven2 + + true + + + + + + central + https://repo1.maven.org/maven2 + + true + + + + + + + securecentral + +