Skip to content

Commit

Permalink
Refactored images and pulled out several base images
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesd committed Apr 25, 2016
1 parent 9a60886 commit f364796
Show file tree
Hide file tree
Showing 8 changed files with 207 additions and 55 deletions.
47 changes: 47 additions & 0 deletions amos-android-build-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#REPO: osrgroup/amos-android-build-image:1.0
#PUSH!
#
# Copyright 2016 The Open Source Research Group,
# University of Erlangen-Nürnberg
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

FROM osrgroup/amos-java-build-image:1.0

# -------------------------------------- Install Android Studio & SDK

# https://hub.docker.com/r/webratio/android-sdk/~/dockerfile/
ENV ANDROID_SDK_VERSION r24.4.1
ENV ANDROID_BUILD_TOOLS_VERSION 23.0.3

RUN dpkg --add-architecture i386 \
&& apt-get -y update \
&& apt-get -y install \
libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 \
&& scrub_image

ENV ANDROID_SDK_FILENAME android-sdk_${ANDROID_SDK_VERSION}-linux.tgz
ENV ANDROID_SDK_URL http://dl.google.com/android/${ANDROID_SDK_FILENAME}
ENV ANDROID_API_LEVELS android-15,android-16,android-17,android-18,android-19,android-20,android-21,android-22,android-23
ENV ANDROID_HOME /opt/android-sdk-linux
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools

RUN cd /opt \
&& wget -q ${ANDROID_SDK_URL} \
&& tar -xzf ${ANDROID_SDK_FILENAME} \
&& rm ${ANDROID_SDK_FILENAME} \
&& echo y | android update sdk --no-ui -a --filter tools,platform-tools,${ANDROID_API_LEVELS},build-tools-${ANDROID_BUILD_TOOLS_VERSION} \
&& scrub_image

# -------------------------------------- Done
53 changes: 53 additions & 0 deletions amos-build-base-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#REPO: osrgroup/amos-build-base-image:1.0
#PUSH!
#
# Copyright 2016 The Open Source Research Group,
# University of Erlangen-Nürnberg
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

FROM ubuntu:14.04

# -------------------------------------- Configure basics

RUN locale-gen en_US.UTF-8 \
&& locale-gen de_DE.UTF-8

ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8

ENV HOME /root

# -------------------------------------- Update base system

ADD assets/scrub_image /usr/local/bin/scrub_image
RUN chmod +x /usr/local/bin/scrub_image

# Upgrade system
RUN apt-get -y update \
&& apt-get -y upgrade \
&& scrub_image

# Remove rsyslog, phusion uses syslog-ng
RUN apt-get -y purge rsyslog \
&& scrub_image

# Install a set of often needed programs
RUN apt-get -y update \
&& apt-get -y --no-install-recommends install \
bash-completion man less nano wget curl zip unzip patch git sudo software-properties-common \
&& scrub_image

# -------------------------------------- Done
File renamed without changes.
22 changes: 1 addition & 21 deletions amos-downloader-base-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,10 @@
# limitations under the License.
#

FROM phusion/baseimage:0.9.18

# -------------------------------------- Configure basics

ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8

ENV HOME /root
FROM osrgroup/amos-service-base-image:1.0

# -------------------------------------- Install packages

ADD assets/scrub_image /usr/local/bin/scrub_image
RUN chmod +x /usr/local/bin/scrub_image

# Upgrade system
RUN apt-get -y update \
&& apt-get -y upgrade \
&& scrub_image

# Remove rsyslog, phusion uses syslog-ng
RUN apt-get -y purge rsyslog \
&& scrub_image

# Install nginx and patch
COPY assets /assets
RUN echo "deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx" > /etc/apt/sources.list.d/nginx.list \
Expand Down
52 changes: 52 additions & 0 deletions amos-java-build-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#REPO: osrgroup/amos-java-build-image:1.0
#PUSH!
#
# Copyright 2016 The Open Source Research Group,
# University of Erlangen-Nürnberg
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

FROM osrgroup/amos-build-base-image:1.0

# -------------------------------------- Install JDK 8

RUN /usr/bin/add-apt-repository -y "ppa:openjdk-r/ppa" \
&& apt-get -y update \
&& apt-get -y --no-install-recommends install \
openjdk-8-jdk openjdk-8-jre-headless \
&& scrub_image

ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64

# -------------------------------------- Install Maven 3

ENV MAVEN_VERSION 3.3.1
ENV M2_HOME /usr/share/maven
ENV MAVEN_OPTS -Xmx1g -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC

RUN wget "http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz" -O - \
| tar xzf - -C /usr/share \
&& mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven \
&& ln -s /usr/share/maven/bin/mvn /usr/bin/mvn \
&& scrub_image

# -------------------------------------- Install gradle

# http://linuxg.net/how-to-install-gradle-2-1-on-ubuntu-14-10-ubuntu-14-04-ubuntu-12-04-and-derivatives/
RUN add-apt-repository -y ppa:cwchien/gradle \
&& apt-get -y update \
&& apt-get -y install gradle \
&& scrub_image

# -------------------------------------- Done
51 changes: 51 additions & 0 deletions amos-service-base-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#REPO: osrgroup/amos-service-base-image:1.0
#PUSH!
#
# Copyright 2016 The Open Source Research Group,
# University of Erlangen-Nürnberg
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

FROM phusion/baseimage:0.9.18

# -------------------------------------- Configure basics

RUN locale-gen en_US.UTF-8 \
&& locale-gen de_DE.UTF-8

ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8

ENV HOME /root

# -------------------------------------- Update base system

ADD assets/scrub_image /usr/local/bin/scrub_image
RUN chmod +x /usr/local/bin/scrub_image

# Upgrade system
RUN apt-get -y update \
&& apt-get -y upgrade \
&& scrub_image

# Remove rsyslog, phusion uses syslog-ng
RUN apt-get -y purge rsyslog \
&& scrub_image

# Install a set of often needed programs
RUN apt-get -y update \
&& apt-get -y --no-install-recommends install \
bash-completion man less nano wget curl zip unzip patch git authbind \
&& scrub_image
File renamed without changes.
37 changes: 3 additions & 34 deletions amos-web-service-base-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,7 @@
# limitations under the License.
#

FROM phusion/baseimage:0.9.18

# -------------------------------------- Configure basics

ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8

ENV HOME /root

# -------------------------------------- Update base system

ADD assets/scrub_image /usr/local/bin/scrub_image
RUN chmod +x /usr/local/bin/scrub_image

# Upgrade system
RUN apt-get -y update \
&& apt-get -y upgrade \
&& scrub_image

# Remove rsyslog, phusion uses syslog-ng
RUN apt-get -y purge rsyslog \
&& scrub_image

# Install a set of often needed programs
RUN apt-get -y update \
&& apt-get -y --no-install-recommends install \
bash-completion man less nano wget curl zip unzip patch git \
&& scrub_image
FROM osrgroup/amos-service-base-image:1.0

# -------------------------------------- Install JDK 8

Expand All @@ -64,12 +36,9 @@ RUN curl -sL https://deb.nodesource.com/setup_5.x | bash - \
&& apt-get -y install nodejs build-essential \
&& scrub_image

# -------------------------------------- Install authbind
# -------------------------------------- Configure authbind

RUN apt-get update -y \
&& apt-get install -y authbind \
&& scrub_image \
&& touch /etc/authbind/byport/80 \
RUN touch /etc/authbind/byport/80 \
&& chmod 777 /etc/authbind/byport/80

# -------------------------------------- Done

0 comments on commit f364796

Please sign in to comment.