-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (41 loc) · 1.48 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
48
49
50
51
52
53
54
FROM ubuntu:jammy
LABEL authors [email protected]
ENV USER snort
ENV HOME /home/${USER}
ENV LOCALES fr_FR.UTF-8
ENV DEBIAN_FRONTEND noninteractive
RUN echo -e '\033[36;1m ******* INSTALL PACKAGES ******** \033[0m'; \
apt-get update && apt-get install --no-install-recommends -y \
sudo \
locales \
curl \
git \
libcrypt-ssleay-perl \
liblwp-useragent-determined-perl \
wget \
libc6-i386
RUN echo -e '\033[36;1m ******* CHANGE LOCALES ******** \033[0m'; \
locale-gen ${LOCALES}
RUN echo -e '\033[36;1m ******* ADD USER ******** \033[0m'; \
useradd -d ${HOME} -m ${USER}; \
passwd -d ${USER}; \
adduser ${USER} sudo
RUN echo -e '\033[36;1m ******* INSTALL SNORT ******** \033[0m'; \
apt-get update; \
apt-get install -y snort; \
ldconfig; \
mv /etc/snort/snort.conf /etc/snort/snort.conf-firstboot
RUN echo -e '\033[36;1m ******* SELECT USER ******** \033[0m'
USER ${USER}
RUN echo -e '\033[36;1m ******* SELECT WORKING SPACE ******** \033[0m'
WORKDIR ${HOME}
RUN echo -e '\033[36;1m ******* CREATE WORKING SPACE ******** \033[0m'; \
mkdir snort
RUN echo -e '\033[36;1m ******* INSTALL TRAFR ******** \033[0m';
RUN wget http://www.mikrotik.com/download/trafr.tgz -O /tmp/trafr.tgz
RUN cd ${HOME} && tar -zvxf /tmp/trafr.tgz && rm /tmp/trafr.tgz
RUN echo -e '\033[36;1m ******* ADD APP ******** \033[0m'
COPY ./snort.sh ${HOME}/snort.sh
RUN sudo chmod +x ${HOME}/snort.sh
RUN echo -e '\033[36;1m ******* CONTAINER START COMMAND ******** \033[0m'
CMD ./snort.sh \