-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (37 loc) · 1.71 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
FROM ubuntu:20.04
LABEL maintainer="[email protected]"
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Vienna
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN apt-get update
RUN apt-get install git wget -y
# --> Install java 1.17 <--
RUN apt-get -y upgrade
RUN apt-get install openjdk-17-jdk openjdk-17-jre -y
RUN echo "JAVA_HOME=\"/usr/lib/jvm/java-1.17.0-openjdk-amd64\"" >> /etc/environment
RUN ["/bin/bash", "-c", "source /etc/environment"]
RUN echo "export JAVA_HOME=/usr/lib/jvm/java-1.17.0-openjdk-amd64" >> ~/.bashrc
RUN echo "export PATH=\$JAVA_HOME/bin:\$PATH" >> ~/.bashrc
RUN ["/bin/bash", "-c", "source ~/.bashrc"]
RUN update-ca-certificates -f
RUN apt-get install --reinstall ca-certificates-java
# --> Install maven 3.8.5 <--
RUN apt-get install maven -y
RUN cd /usr/local && wget https://downloads.apache.org/maven/maven-3/3.8.5/binaries/apache-maven-3.8.5-bin.tar.gz
RUN cd /usr/local && tar xzf apache-maven-3.8.5-bin.tar.gz \
&& ln -s apache-maven-3.8.5 apache-maven
RUN echo "export JAVA_HOME=/usr/lib/jvm/java-1.17.0-openjdk-amd64" >> /etc/profile.d/apache-maven.sh
RUN echo "export M2_HOME=/usr/local/apache-maven" >> /etc/profile.d/apache-maven.sh
RUN echo "export MAVEN_HOME=/usr/local/apache-maven" >> /etc/profile.d/apache-maven.sh
RUN echo "export PATH=\${M2_HOME}/bin:\${PATH}" >> /etc/profile.d/apache-maven.sh
RUN source /etc/profile.d/apache-maven.sh && mvn -version
RUN java -version
# COPY ./ssl /ssl
# --> Install Signal Server <--
COPY ./Signal-Server /Signal-Server
RUN source /etc/profile.d/apache-maven.sh && cd /Signal-Server && mvn -P exclude-abusive-message-filter -DskipTests -e install
COPY start.sh /start.sh
# --> Run server <--
EXPOSE 8080
EXPOSE 8081
CMD ["/bin/bash", "-c", "/start.sh"]