forked from helospark/tactview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (31 loc) · 1.63 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
# This Dockerfile configures the build environment in a Docker for Tactview for Linux environment, but does not actually build Tactview.
# Build with:
# docker build -t helospark/tactview_build .
FROM ubuntu:bionic-20200921
VOLUME /tactview
VOLUME /tmp/.tactview
WORKDIR /tmp
RUN apt-get update && apt-get install -y wget
RUN wget -O maven.tar.gz https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz && \
tar -xvzf maven.tar.gz && \
mv apache-maven-3.6.3 /opt/apache-maven && \
rm maven.tar.gz
RUN wget -O jdk.tar.gz https://download.java.net/java/GA/jdk15/779bf45e88a44cbd9ea6621d33e33db1/36/GPL/openjdk-15_linux-x64_bin.tar.gz && \
tar -xvzf jdk.tar.gz && \
mv jdk-15 /opt/jdk-15 && \
rm jdk.tar.gz
ENV JAVA_HOME=/opt/jdk-15
ENV PATH="/opt/jdk-15/bin:/opt/apache-maven/bin:${PATH}"
# Separate out this step, so the layer can be cached
ADD tactview-native/dependency_fragments/install_apt_dependencies.sh /tmp/dependency_fragments/install_apt_dependencies.sh
RUN chmod +x /tmp/dependency_fragments/install_apt_dependencies.sh
RUN /tmp/dependency_fragments/install_apt_dependencies.sh
RUN echo $(pwd)
ADD tactview-native/build_dependencies.sh /tmp/build_dependencies.sh
RUN chmod +x /tmp/build_dependencies.sh
RUN ./build_dependencies.sh -r -c
RUN rm /tmp/build_dependencies.sh /tmp/dependency_fragments/install_apt_dependencies.sh
# Set .m2 directory to tmp, so it can be attached locally for better caching
RUN sed -i "s/<\!-- localRepository/<localRepository>\/tmp\/.m2<\/localRepository>\n<\!--/g" /opt/apache-maven/conf/settings.xml
WORKDIR /tactview
ENTRYPOINT ["./create-release-linux-x64.sh"]