-
Notifications
You must be signed in to change notification settings - Fork 105
/
Dockerfile
45 lines (37 loc) · 1.56 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
FROM maven:3-jdk-8 as build
MAINTAINER Burak Emre Kabakci "emre@rakam.io"
WORKDIR /var/app
ADD pom.xml pom.xml
ADD ./rakam/pom.xml rakam/pom.xml
ADD ./rakam-aws/pom.xml rakam-aws/pom.xml
ADD ./rakam-postgresql/pom.xml rakam-postgresql/pom.xml
ADD ./rakam-presto/pom.xml rakam-presto/pom.xml
ADD ./rakam-presto-kafka/pom.xml rakam-presto-kafka/pom.xml
ADD ./rakam-spi/pom.xml rakam-spi/pom.xml
ADD ./mapper/rakam-mapper-geoip-ip2location/pom.xml mapper/rakam-mapper-geoip-ip2location/pom.xml
ADD ./mapper/rakam-mapper-geoip-maxmind/pom.xml mapper/rakam-mapper-geoip-maxmind/pom.xml
ADD ./mapper/rakam-mapper-website/pom.xml mapper/rakam-mapper-website/pom.xml
RUN mvn verify clean --fail-never
ADD ./rakam/ rakam
ADD ./rakam-aws/ rakam-aws
ADD ./rakam-postgresql/ rakam-postgresql
ADD ./rakam-presto/ rakam-presto
ADD ./rakam-presto-kafka/ rakam-presto-kafka
ADD ./rakam-spi/ rakam-spi
ADD ./mapper/rakam-mapper-geoip-ip2location/ mapper/rakam-mapper-geoip-ip2location
ADD ./mapper/rakam-mapper-geoip-maxmind/ mapper/rakam-mapper-geoip-maxmind
ADD ./mapper/rakam-mapper-website/ mapper/rakam-mapper-website
RUN mvn package -T 1C -DskipTests=true
RUN apt-get update
# Make environment variable active
RUN cd /var/app/rakam/target/rakam-*-bundle/rakam-*/ && \
mkdir etc && \
echo '\n-Denv=RAKAM_CONFIG' >> ./etc/jvm.config
FROM openjdk:8-jre
COPY --from=build /var/app/rakam/target/ /rtmp
ADD ./entrypoint.sh /app/entrypoint.sh
RUN cp -r /rtmp/rakam-*-bundle/rakam-*/* /app/ && \
chmod +x /app/entrypoint.sh && \
rm -rf /rtmp
ENTRYPOINT ["/app/entrypoint.sh"]
EXPOSE 9999