-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (23 loc) · 968 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
FROM alpine as packager
RUN apk -U --progress -q --no-cache add openjdk11-jdk openjdk11-jmods libxext libxrender libxtst libxi
ENV JAVA_MINIMAL="/opt/java-minimal"
RUN /usr/lib/jvm/java-11-openjdk/bin/jlink \
--add-modules \
java.base,java.sql,java.naming,java.desktop,java.management,java.security.jgss,java.instrument \
--compress 2 \
--strip-debug \
--no-header-files \
--no-man-pages \
--output "$JAVA_MINIMAL"
FROM alpine
WORKDIR /opt/IRPF2023
ARG url=https://downloadirpf.receita.fazenda.gov.br/irpf/2023/irpf/arquivos/IRPF2023-1.5.zip
ENV JAVA_HOME=/opt/java-minimal
ENV PATH="$PATH:$JAVA_HOME/bin"
COPY --from=packager "$JAVA_HOME" "$JAVA_HOME"
RUN apk -U --progress -q --no-cache add tini wget ttf-dejavu libxext libxrender libxtst libxi \
&& adduser -D -u 1000 irpf \
&& wget -q "$url" -O /opt/irpf.zip \
&& unzip -qq /opt/irpf.zip -d /opt
USER irpf
ENTRYPOINT [ "java", "-jar", "/opt/IRPF2023/irpf.jar" ]