forked from validator/validator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (38 loc) · 1.56 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
FROM debian:stable-slim AS builder
# to use:
# docker build -t validator/validator .
# docker run -it --rm \
# -e CONNECTION_TIMEOUT_SECONDS=15 \
# -e SOCKET_TIMEOUT_SECONDS=15 \
# -p 8888:8888 \
# validator/validator
LABEL name="vnu"
LABEL version="dev"
LABEL maintainer="Michael[tm] Smith <[email protected]>"
ADD https://github.com/validator/validator/releases/download/linux/vnu.linux.zip .
ADD https://github.com/validator/validator/releases/download/linux/vnu.linux.zip.asc .
ADD https://github.com/validator/validator/releases/download/linux/vnu.linux.zip.sha1 .
ADD https://github.com/validator/validator/releases/download/linux/vnu.linux.zip.sha1.asc .
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN apt-get update && apt-get install --no-install-recommends -y \
unzip=6.0-23+deb10u2 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& echo "$(cat vnu.linux.zip.sha1) vnu.linux.zip" | sha1sum -c - \
&& unzip ./vnu.linux.zip \
&& rm ./vnu.linux.zip* \
&& apt-get purge -y --auto-remove unzip
# hadolint ignore=DL3006
FROM gcr.io/distroless/base
COPY --from=builder /vnu-runtime-image /vnu-runtime-image
COPY --from=builder /lib/x86_64-linux-gnu/libz.so.1 /lib/x86_64-linux-gnu/libz.so.1
COPY --from=builder /bin/sh /bin/sh
COPY --from=builder /usr/bin/dirname /usr/bin/dirname
ENV LANG C.UTF-8
ENV JAVA_TOOL_OPTIONS ""
ENV CONNECTION_TIMEOUT_SECONDS 5
ENV SOCKET_TIMEOUT_SECONDS 5
ENV BIND_ADDRESS 0.0.0.0
ENV PATH=/vnu-runtime-image/bin:$PATH
EXPOSE 8888
CMD ["./vnu-runtime-image/bin/java", "-m", "vnu/nu.validator.servlet.Main", "8888"]