forked from ybmadhu/javaee-docker-wildfly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (23 loc) · 943 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
33
34
35
36
37
38
39
40
41
FROM ubuntu
MAINTAINER Rafael Pestano <[email protected]>
# setup WildFly
ADD wildfly-8.2.0.Final /opt/wildfly
# install example app on wildfy
ADD car-service.war /opt/wildfly/standalone/deployments/
# setup Java
RUN mkdir /opt/java
COPY jdk-8u131-linux-x64.tar.gz /opt/java/
# change dir to Java installation dir
WORKDIR /opt/java/
RUN tar -zxf jdk-8u131-linux-x64.tar.gz
# setup nvironment variables
RUN ls -ltr /opt/java/
RUN update-alternatives --install /usr/bin/javac javac /opt/java/jdk1.8.0_131/bin/javac 100
RUN update-alternatives --install /usr/bin/java java /opt/java/jdk1.8.0_131/bin/java 100
RUN update-alternatives --display java
RUN java -version
# Expose the ports we're interested in
EXPOSE 8080 9990
# Set the default command to run on boot
# This will boot WildFly in the standalone mode and bind to all interface
CMD ["/opt/wildfly/bin/standalone.sh", "-c", "standalone-full.xml", "-b", "0.0.0.0"]