forked from fBedecarrats/docker-apache-atlas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
65 lines (55 loc) · 2.44 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM scratch
FROM ubuntu:18.04
LABEL maintainer="[email protected]"
ARG VERSION=2.1.0
RUN apt-get update \
&& apt-get -y upgrade \
&& apt-get -y install apt-utils \
&& apt-get -y install \
maven \
wget \
git \
python \
openjdk-8-jdk-headless \
patch \
unzip \
&& cd /tmp \
&& wget http://mirror.linux-ia64.org/apache/atlas/${VERSION}/apache-atlas-${VERSION}-sources.tar.gz \
&& mkdir -p /opt/gremlin \
&& mkdir -p /tmp/atlas-src \
&& tar --strip 1 -xzvf apache-atlas-${VERSION}-sources.tar.gz -C /tmp/atlas-src \
&& rm apache-atlas-${VERSION}-sources.tar.gz \
&& cd /tmp/atlas-src \
&& sed -i 's/http:\/\/repo1.maven.org\/maven2/https:\/\/repo1.maven.org\/maven2/g' pom.xml \
&& export MAVEN_OPTS="-Xms2g -Xmx2g" \
&& export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64" \
&& mvn clean -Dmaven.repo.local=/tmp/.mvn-repo -Dhttps.protocols=TLSv1.2 -DskipTests package -Pdist,embedded-hbase-solr \
&& tar -xzvf /tmp/atlas-src/distro/target/apache-atlas-${VERSION}-server.tar.gz -C /opt \
&& rm -Rf /tmp/atlas-src \
&& rm -Rf /tmp/.mvn-repo \
&& apt-get -y --purge remove \
maven \
git \
&& apt-get -y remove openjdk-11-jre-headless \
&& apt-get -y autoremove \
&& apt-get -y clean
VOLUME ["/opt/apache-atlas-${VERSION}/conf", "/opt/apache-atlas-${VERSION}/logs"]
COPY atlas_start.py.patch atlas_config.py.patch /opt/apache-atlas-${VERSION}/bin/
RUN cd /opt/apache-atlas-${VERSION}/bin \
&& patch -b -f < atlas_start.py.patch \
&& patch -b -f < atlas_config.py.patch
COPY conf/hbase/hbase-site.xml.template /opt/apache-atlas-${VERSION}/conf/hbase/hbase-site.xml.template
COPY conf/atlas-env.sh /opt/apache-atlas-${VERSION}/conf/atlas-env.sh
COPY conf/gremlin /opt/gremlin/
RUN cd /opt/apache-atlas-${VERSION} \
&& ./bin/atlas_start.py -setup || true
RUN cd /opt/apache-atlas-${VERSION} \
&& ./bin/atlas_start.py & \
touch /opt/apache-atlas-${VERSION}/logs/application.log \
&& tail -f /opt/apache-atlas-${VERSION}/logs/application.log | sed '/AtlasAuthenticationFilter.init(filterConfig=null)/ q' \
&& sleep 10 \
&& /opt/apache-atlas-${VERSION}/bin/atlas_stop.py
# Start edits from sburn code base to provide an UI in French
COPY translate.sh /opt/apache-atlas-${VERSION}/bin/translate.sh
RUN chmod +x /opt/apache-atlas-${VERSION}/bin/translate.sh \
&& ./opt/apache-atlas-${VERSION}/bin/translate.sh