-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
33 lines (28 loc) · 999 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 ubuntu:bionic AS builder
LABEL maintainder="UDamasceno <[email protected]>"
WORKDIR /opt
RUN apt-get update -y && apt-get upgrade -y && apt-get autoremove -y\
&& apt-get install wget -y\
&& wget https://github.com/UellingtonDamasceno/virtual-fot-device/archive/refs/tags/latest.zip\
&& apt-get install unzip -y\
&& unzip latest.zip\
&& rm latest.zip\
&& mv virtual-fot-device-latest vfd\
&& cd vfd\
&& apt-get install openjdk-11-jdk maven -y\
&& mvn clean install\
&& apt-get purge maven -y\
&& apt-get autoremove -y\
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
FROM adoptopenjdk/openjdk11:jre-11.0.18_10-alpine AS vfd-run
WORKDIR /opt
RUN apk add --update --no-cache \
bash \
tcpdump \
iperf \
busybox-extras \
iproute2 \
iputils
LABEL maintainder="UDamasceno <[email protected]>"
COPY --from=builder /opt/vfd/target/virtual-fot-device-1.0-SNAPSHOT-jar-with-dependencies.jar /opt/device.jar
ENTRYPOINT ["java", "-jar", "device.jar"]