forked from fr3nd/docker-serposcope
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
29 lines (21 loc) · 998 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
FROM openjdk:8u171-jre
LABEL org.opencontainers.image.authors="[email protected]"
RUN apt-get update && apt-get install -y \
curl \
&& rm -rf /usr/share/doc/* && \
rm -rf /usr/share/info/* && \
rm -rf /tmp/* && \
rm -rf /var/tmp/* && \
rm -rf /var/cache/apt/*
ENV SERPOSCOPE_VERSION 2.15.0
RUN mkdir -p /opt/serposcope /var/log/serposcope /var/lib/serposcope/
RUN curl -L https://serposcope.serphacker.com/download/${SERPOSCOPE_VERSION}/serposcope-${SERPOSCOPE_VERSION}.jar > /opt/serposcope.jar -k
RUN useradd -u 1000 -d /home/serposcope -m serposcope
COPY serposcope.conf /etc/serposcope.conf
RUN chown serposcope:serposcope /var/log/serposcope /var/lib/serposcope/ /etc/serposcope.conf
COPY entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.sh
EXPOSE 7134
USER serposcope
HEALTHCHECK --interval=30s --timeout=3s --retries=3 CMD curl -X GET --fail http://localhost:7134 || exit 1
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]