Hi Tyler:
I followed the
instructions and built Che with the php plugin. I also modified the
Dockerfile to do it while generating the image using Che git repos. Tha process
takes more time, though. It's probably a better idea to built Che
outside the container and then download it as with the Dockerfile from github.
Here it is the
modified Dockerfile to build Che with one plugin (php) in case anyone
find it of any use:
FROM codenvy/shellinabox
ENV CHE_VERSION="3.12.2" \
MAVEN_VERSION=3.2.2 \
JAVA_VERSION=8u45 \
JAVA_VERSION_PREFIX=1.8.0_45 \
CODENVY_LOCAL_CONF_DIR=/home/user/.codenvy
ENV JAVA_HOME=/opt/jdk$JAVA_VERSION_PREFIX \
M2_HOME=/opt/apache-maven-$MAVEN_VERSION
ENV PATH=$JAVA_HOME/bin:$M2_HOME/bin:$PATH
RUN sudo sed -i "s@http://http.debian.net@http://mirrors.ucr.ac.cr@" /etc/apt/sources.list && \
sudo apt-get update && sudo apt-get install -y -q git subversion && \
sudo apt-get clean all && \
git clone -b $CHE_VERSION https://github.com/codenvy/che.git /home/user/repo && \
wget \
--no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
-qO- \
"http://download.oracle.com/otn-pub/java/jdk/$JAVA_VERSION-b14/jdk-$JAVA_VERSION-linux-x64.tar.gz" | sudo tar -zx -C /opt/ && \
echo "export JAVA_HOME=$JAVA_HOME" >> /home/user/.bashrc && \
mkdir /opt/apache-maven-$MAVEN_VERSION/ && \
sudo wget -qO- "https://archive.apache.org/dist/maven/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz" | sudo tar -zx --strip-components=1 -C /opt/apache-maven-$MAVEN_VERSION/ && \
echo "export M2_HOME=$M2_HOME" >> /home/user/.bashrc && \
mkdir -p /home/user/.codenvy && \
echo "export PATH=$PATH" >> /home/user/.bashrc && \
cd /home/user/.codenvy && \
touch preference.json profile.json vfs && \
echo "1q2w3e=/home/user/che/temp/fs-root" >> vfs && \
echo "export CODENVY_LOCAL_CONF_DIR=$CODENVY_LOCAL_CONF_DIR" >> /home/user/.bashrc && \
cd /home/user/repo && \
sed -i "0,/.*<dependency>.*/s@@ <dependency>\n\
<groupId>org.eclipse.che.plugin</groupId>\n\
<artifactId>che-plugin-php-ext-php</artifactId>\n\
<version>\${che.plugins.version}</version>\n\
</dependency>\n&@" /home/user/repo/assembly-sdk-war/pom.xml && \
sed -i "0,/.*<\/module>.*/s@@ <inherits name=\"org.eclipse.che.ide.ext.php.PHP\"/>\n&@" \
/home/user/repo/assembly-sdk-war/src/main/resources/org/eclipse/che/ide/IDE.gwt.xml && \
mvn sortpom:sort && \
mvn clean install && \
cp -r /home/user/repo/assembly-sdk/target/assembly-sdk-$CHE_VERSION/assembly-sdk-$CHE_VERSION/ /home/user/che && \
sudo rm -rf /home/user/.m2/repository/* && \
sudo rm -rf /home/user/repo && \
sudo chmod 757 -R /home/user/che && \
sudo chmod 757 -R /home/user/.codenvy
ADD che.properties /home/user/.codenvy/che.properties
WORKDIR /home/user/che/bin
# expose 8080 port and a range of ports for runners
EXPOSE 8080 49152-49162
CMD ./che.sh run
Thank you =),