Skip to content

Commit da909fc

Browse files
committed
Add Dockerfile for ARM platform
Fix #14
1 parent ca18fc1 commit da909fc

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
FROM ubuntu:trusty
2+
3+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
4+
5+
######
6+
# Install common dependencies from packages
7+
######
8+
RUN apt-get update && apt-get install --no-install-recommends -y \
9+
git curl ant make \
10+
cmake gcc g++ \
11+
protobuf-compiler libprotoc-dev \
12+
protobuf-c-compiler libprotobuf-dev \
13+
build-essential libtool \
14+
zlib1g-dev pkg-config libssl-dev \
15+
snappy libsnappy-dev \
16+
bzip2 libbz2-dev \
17+
libjansson-dev \
18+
fuse libfuse-dev \
19+
libcurl4-openssl-dev \
20+
python python2.7 pylint \
21+
openjdk-7-jdk doxygen
22+
23+
#######
24+
# Install maven 3.2.5, the maven-3.0.5 of ubuntu trusty defaultly use http than https which may cause many errors
25+
#######
26+
RUN curl -sL https://downloads.apache.org/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz | tar zx -C /opt/
27+
ENV MAVEN_HOME /opt/apache-maven-3.2.5/
28+
ENV PATH "/opt/apache-maven-3.2.5/bin:${PATH}"
29+
30+
#######
31+
# Java OpenJDK
32+
#######
33+
RUN apt-get install -y software-properties-common
34+
RUN add-apt-repository -y ppa:webupd8team/java
35+
RUN apt-get update
36+
37+
# Install OpenJDK 7
38+
RUN apt-get install -y openjdk-7-jdk
39+
40+
######
41+
# Install spotbugs (successor of findbugs)
42+
######
43+
RUN mkdir -p /opt/spotbugs && \
44+
curl -L -s -S \
45+
https://repo1.maven.org/maven2/com/github/spotbugs/spotbugs/3.1.2/spotbugs-3.1.2.tgz \
46+
-o /opt/spotbugs.tar.gz && \
47+
tar xzf /opt/spotbugs.tar.gz --strip-components 1 -C /opt/spotbugs
48+
ENV FINDBUGS_HOME /opt/spotbugs
49+
50+
####
51+
# Install shellcheck(broken)
52+
####
53+
# RUN apt-get install -y cabal-install
54+
# RUN cabal update && cabal install shellcheck --global
55+
56+
###
57+
# Avoid out of memory errors in builds
58+
###
59+
ENV MAVEN_OPTS -Xms256m -Xmx1536m
60+
61+
###
62+
# Everything past this point is either not needed for testing or breaks Yetus.
63+
# So tell Yetus not to read the rest of the file:
64+
# YETUS CUT HERE
65+
###
66+
67+
####
68+
# Install Forrest (for Apache Hadoop website)
69+
###
70+
RUN mkdir -p /usr/local/apache-forrest ; \
71+
curl -O http://archive.apache.org/dist/forrest/0.8/apache-forrest-0.8.tar.gz ; \
72+
tar xzf *forrest* --strip-components 1 -C /usr/local/apache-forrest ; \
73+
echo 'forrest.home=/usr/local/apache-forrest' > build.properties
74+
75+
####
76+
# Building patched protobuf-2.5.0
77+
###
78+
RUN curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz | tar zx -C /opt/ \
79+
&& cd /opt/protobuf-2.5.0 \
80+
&& curl -L -O https://gist.githubusercontent.com/liusheng/64aee1b27de037f8b9ccf1873b82c413/raw/118c2fce733a9a62a03281753572a45b6efb8639/protobuf-2.5.0-arm64.patch \
81+
&& patch -p1 < protobuf-2.5.0-arm64.patch \
82+
&& ./configure --prefix=/opt/protobuf \
83+
&& make install
84+
RUN echo "/opt/protobuf/lib/" > /etc/ld.so.conf.d/protobuf-2.5.0.conf && ldconfig
85+
ENV PROTOBUF_HOME /opt/protobuf
86+
ENV PATH "${PATH}:/opt/protobuf/bin"
87+
88+
ENV JAVA_HOME /usr/lib/jvm/java-7-openjdk-arm64
89+
90+
# Add a welcome message and environment checks.
91+
ADD hadoop_env_checks.sh /root/hadoop_env_checks.sh
92+
RUN chmod 755 /root/hadoop_env_checks.sh
93+
RUN echo '~/hadoop_env_checks.sh' >> /root/.bashrc

0 commit comments

Comments
 (0)