Skip to content

Commit

Permalink
Merge pull request #3 from Pindar/revert-1-alpine-image
Browse files Browse the repository at this point in the history
Revert "update base image to alpine"
  • Loading branch information
Pindar committed Apr 18, 2015
2 parents d6241cf + aa80705 commit 97a421d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 73 deletions.
94 changes: 25 additions & 69 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,75 +1,31 @@
FROM gliderlabs/alpine
FROM ubuntu:14.04
MAINTAINER Simon Dittlmann

RUN apk-install bash curl tar gzip

ENV KIBANA_VERSION 4.0.2
RUN curl -L -O https://download.elastic.co/kibana/kibana/kibana-${KIBANA_VERSION}-linux-x64.tar.gz && \
tar xfv kibana-${KIBANA_VERSION}-linux-x64.tar.gz -C /

# Java Version
ENV JAVA_VERSION_MAJOR 8
ENV JAVA_VERSION_MINOR 40
ENV JAVA_VERSION_BUILD 26
ENV JAVA_PACKAGE server-jre

# Download and unarchive Java
RUN mkdir -p /opt
RUN curl -jksSLH "Cookie: oraclelicense=accept-securebackup-cookie"\
http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-b${JAVA_VERSION_BUILD}/${JAVA_PACKAGE}-${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-linux-x64.tar.gz \
| gunzip -c - | tar -xf - -C /opt &&\
ln -s /opt/jdk1.${JAVA_VERSION_MAJOR}.0_${JAVA_VERSION_MINOR} /opt/jdk &&\
rm -rf /opt/jdk/*src.zip \
/opt/jdk/lib/missioncontrol \
/opt/jdk/lib/visualvm \
/opt/jdk/lib/*javafx* \
/opt/jdk/jre/lib/plugin.jar \
/opt/jdk/jre/lib/ext/jfxrt.jar \
/opt/jdk/jre/bin/javaws \
/opt/jdk/jre/lib/javaws.jar \
/opt/jdk/jre/lib/desktop \
/opt/jdk/jre/plugin \
/opt/jdk/jre/lib/deploy* \
/opt/jdk/jre/lib/*javafx* \
/opt/jdk/jre/lib/*jfx* \
/opt/jdk/jre/lib/amd64/libdecora_sse.so \
/opt/jdk/jre/lib/amd64/libprism_*.so \
/opt/jdk/jre/lib/amd64/libfxplugins.so \
/opt/jdk/jre/lib/amd64/libglass.so \
/opt/jdk/jre/lib/amd64/libgstreamer-lite.so \
/opt/jdk/jre/lib/amd64/libjavafx*.so \
/opt/jdk/jre/lib/amd64/libjfx*.so

# Set environment
ENV JAVA_HOME /opt/jdk
ENV PATH ${PATH}:${JAVA_HOME}/bin


# install node
ENV VERSION=v1.7.1 CMD=iojs DOMAIN=iojs.org

RUN apk update && \
apk add make gcc g++ python paxctl curl && \
curl -sSL https://${DOMAIN}/dist/${VERSION}/${CMD}-${VERSION}.tar.gz | tar -xz && \
cd /${CMD}-${VERSION} && \
NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) && \
export CFLAGS="$CFLAGS -D__USE_MISC" && \
./configure --prefix=/usr && \
make -j${NPROC} -C out mksnapshot && \
paxctl -c -m out/Release/mksnapshot && \
make -j${NPROC} && \
make install && \
paxctl -cm /usr/bin/${CMD} && \
apk del make gcc g++ python paxctl curl && \
apk add libgcc libstdc++ && \
cd / && \
rm -rf /${CMD}-${VERSION} /var/cache/apk/* /tmp/* /root/.npm \
/usr/lib/node_modules/npm/man /usr/lib/node_modules/npm/doc /usr/lib/node_modules/npm/html

RUN rm /kibana-4.0.2-linux-x64/node/bin/node && \
rm /kibana-4.0.2-linux-x64/node/bin/npm && \
ln -s /usr/bin/node /kibana-4.0.2-linux-x64/node/bin/node && \
ln -s /usr/bin/npm /kibana-4.0.2-linux-x64/node/bin/npm
RUN apt-get update -y -qq && \
apt-get install -y -qq curl tar

RUN curl -L -O https://download.elasticsearch.org/kibana/kibana/kibana-4.0.0-linux-x64.tar.gz && \
tar xfv kibana-4.0.0-linux-x64.tar.gz -C /

ENV JAVA_VERSION 8u25
ENV JAVA_FOLDER_NAME jdk1.8.0_25
RUN apt-get update -qq && \
apt-get install -y wget gzip && \
cd /tmp && wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com; oraclelicense=accept-securebackup-cookie; s_nr=1394181036342;" http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION}-b17/jdk-${JAVA_VERSION}-linux-x64.tar.gz && \
gzip -d jdk-${JAVA_VERSION}-linux-x64.tar.gz && \
tar -xf jdk-${JAVA_VERSION}-linux-x64.tar && \
mkdir -p /opt/Oracle_Java && \
mv /tmp/${JAVA_FOLDER_NAME} /opt/Oracle_Java/${JAVA_FOLDER_NAME} && \
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/Oracle_Java/${JAVA_FOLDER_NAME}/bin/java" 1 && \
sudo update-alternatives --install "/usr/bin/javac" "javac" "/opt/Oracle_Java/${JAVA_FOLDER_NAME}/bin/javac" 1 && \
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/opt/Oracle_Java/${JAVA_FOLDER_NAME}/bin/javaws" 1 && \
sudo update-alternatives --install "/usr/bin/jar" "jar" "/opt/Oracle_Java/${JAVA_FOLDER_NAME}/bin/jar" 1 && \
sudo update-alternatives --set "java" "/opt/Oracle_Java/${JAVA_FOLDER_NAME}/bin/java" && \
sudo update-alternatives --set "javac" "/opt/Oracle_Java/${JAVA_FOLDER_NAME}/bin/javac" && \
sudo update-alternatives --set "javaws" "/opt/Oracle_Java/${JAVA_FOLDER_NAME}/bin/javaws" && \
sudo update-alternatives --set "jar" "/opt/Oracle_Java/${JAVA_FOLDER_NAME}/bin/jar" && \
rm -rf /tmp/jdk-${JAVA_VERSION}-linux-x64.tar

ADD scripts/start.sh /start.sh
RUN chmod +x /start.sh
Expand Down
8 changes: 4 additions & 4 deletions scripts/start.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash -e


sed -i "s/elasticsearch_url: \"http:\/\/localhost:9200\"/elasticsearch_url: \"$(echo $ELASTICSEARCH_ENDPOINT | sed -e 's/[]\/$*.^|[]/\\&/g')\"/" /kibana-${KIBANA_VERSION}-linux-x64/config/kibana.yml
sed -i "s/elasticsearch_url: \"http:\/\/localhost:9200\"/elasticsearch_url: \"$(echo $ELASTICSEARCH_ENDPOINT | sed -e 's/[]\/$*.^|[]/\\&/g')\"/" /kibana-4.0.0-linux-x64/config/kibana.yml

if ! [[ $USER == "" && $PASS == "" ]]; then
echo "kibana_elasticsearch_username: $USER" >> /kibana-${KIBANA_VERSION}-linux-x64/config/kibana.yml
echo "kibana_elasticsearch_password: $PASS" >> /kibana-${KIBANA_VERSION}-linux-x64/config/kibana.yml
echo "kibana_elasticsearch_username: $USER" >> /kibana-4.0.0-linux-x64/config/kibana.yml
echo "kibana_elasticsearch_password: $PASS" >> /kibana-4.0.0-linux-x64/config/kibana.yml
fi


exec /kibana-${KIBANA_VERSION}-linux-x64/bin/kibana
exec /kibana-4.0.0-linux-x64/bin/kibana

0 comments on commit 97a421d

Please sign in to comment.