-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
50 lines (33 loc) · 1.32 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
39
40
41
42
43
44
45
46
47
FROM python:3-slim
LABEL maintainer="[email protected]"
## setup home folder
RUN mkdir -p /root/.config/NPMGRAF
## install curl gcc for slim image
RUN apt-get update && apt-get install -y \
curl gcc git build-essential\
&& rm -rf /var/lib/apt/lists/*
# Clone the grepcidr repository
RUN git clone https://github.com/ryantig/grepcidr.git /opt/grepcidr
# Build and install grepcidr
RUN cd /opt/grepcidr && \
make && \
make install
# Clean up by removing the source code if not needed
RUN rm -rf /opt/grepcidr
RUN apt-get remove git build-essential -y\
&& rm -rf /var/cache/apk/* \
&& apt-get autoremove -y && apt-get clean
COPY requirements.txt /root/.config/NPMGRAF/requirements.txt
RUN pip install -r /root/.config/NPMGRAF/requirements.txt
## Copy files
COPY Getipinfo.py /root/.config/NPMGRAF/Getipinfo.py
RUN chmod +x /root/.config/NPMGRAF/Getipinfo.py
COPY Internalipinfo.py /root/.config/NPMGRAF/Internalipinfo.py
RUN chmod +x /root/.config/NPMGRAF/Internalipinfo.py
COPY sendips.sh /root/.config/NPMGRAF/sendips.sh
RUN chmod +x /root/.config/NPMGRAF/sendips.sh
COPY sendredirectionips.sh /root/.config/NPMGRAF/sendredirectionips.sh
RUN chmod +x /root/.config/NPMGRAF/sendredirectionips.sh
COPY start.sh /root/start.sh
RUN chmod +x /root/start.sh
ENTRYPOINT ["/root/start.sh"]