-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (27 loc) · 951 Bytes
/
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
FROM alpine:3.11
# Install OpenJDK 11
RUN apk add openjdk11
# Install Maven 3.6.3
RUN apk add --no-cache curl tar bash
ARG MAVEN_VERSION=3.6.3
ARG USER_HOME_DIR="/root"
RUN mkdir -p /usr/share/maven && \
curl -fsSL http://apache.osuosl.org/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar -xzC /usr/share/maven --strip-components=1 && \
ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
ENV MAVEN_HOME /usr/share/maven
ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2"
#ENV MAVEN_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
# Copy source to Image
RUN mkdir -p /usr/telnychat
WORKDIR /usr/telnychat
# Copy pom.xml
COPY pom.xml /usr/telnychat
# Copy /src directory
COPY src /usr/telnychat/src
# Execute build with Test
#RUN mvn clean install -DskipTests=true
RUN mvn clean install
WORKDIR /usr/telnychat/target
CMD ["sh", "-c", "java -Dline.separator='\r\n' -jar telnychat.jar"]
# Expose Server on port 10000
EXPOSE 10000