Created
July 4, 2016 05:54
-
-
Save AndrienkoAleksandr/41e5ae7edae6b8579131778f1e2b75ba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2012-2016 Codenvy, S.A. | |
# 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: | |
# Codenvy, S.A. - initial API and implementation | |
FROM ubuntu | |
EXPOSE 4403 8000 8080 9876 22 | |
RUN apt-get update && \ | |
apt-get -y install sudo openssh-server procps wget unzip mc curl subversion software-properties-common python-software-properties && \ | |
mkdir /var/run/sshd && \ | |
sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd && \ | |
echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \ | |
useradd -u 1000 -G users,sudo -d /home/user --shell /bin/bash -m user && \ | |
echo "secret\nsecret" | passwd user && \ | |
add-apt-repository ppa:git-core/ppa && \ | |
apt-get update && \ | |
sudo apt-get install git -y && \ | |
apt-get clean && \ | |
apt-get -y autoremove && \ | |
rm -rf /var/lib/apt/lists/* | |
USER user | |
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 MAVEN_VERSION=3.3.9 \ | |
JAVA_VERSION=8u45 \ | |
JAVA_VERSION_PREFIX=1.8.0_45 \ | |
TOMCAT_HOME=/home/user/tomcat8 | |
ENV JAVA_HOME=/opt/jdk$JAVA_VERSION_PREFIX \ | |
M2_HOME=/home/user/apache-maven-$MAVEN_VERSION | |
ENV PATH=$JAVA_HOME/bin:$M2_HOME/bin:$PATH | |
RUN mkdir /home/user/cbuild /home/user/tomcat8 /home/user/apache-maven-$MAVEN_VERSION && \ | |
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/ && \ | |
wget -qO- "http://apache.ip-connect.vn.ua/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz" | tar -zx --strip-components=1 -C /home/user/apache-maven-$MAVEN_VERSION/ | |
ENV TERM xterm | |
RUN wget -qO- "http://archive.apache.org/dist/tomcat/tomcat-8/v8.0.24/bin/apache-tomcat-8.0.24.tar.gz" | tar -zx --strip-components=1 -C /home/user/tomcat8 && \ | |
rm -rf /home/user/tomcat8/webapps/* | |
ENV LANG C.UTF-8 | |
RUN echo "export JAVA_HOME=/opt/jdk$JAVA_VERSION_PREFIX\nexport M2_HOME=/home/user/apache-maven-$MAVEN_VERSION\nexport TOMCAT_HOME=/home/user/tomcat8\nexport PATH=$JAVA_HOME/bin:$M2_HOME/bin:$PATH" >> /home/user/.bashrc | |
CMD sudo /usr/sbin/sshd -D && \ | |
tail -f /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment