-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
39 lines (31 loc) · 1.26 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
FROM debian:bullseye
WORKDIR /opt
# install required packages via apt
RUN apt-get update && apt-get install -y gcc net-tools vim gdb python wget git make procps libpcre3-dev libdb-dev libxt-dev libxaw7-dev
# install exim
RUN useradd exim-demo
COPY ./Exim exim/
RUN mkdir -p exim/src/Local
COPY exim_files/Makefile exim/src/Local/Makefile
COPY exim_files/eximon.conf exim/src/Local/eximon.conf
COPY exim_files/Makefile-Linux exim/src/OS/Makefile-Linux
RUN EXIM_RELEASE_VERSION=4.89 make -C exim/src install
COPY exim_files/configure /usr/exim/configure
# install pwndbg (see https://github.com/pwndbg/pwndbg/blob/dev/Dockerfile)
ENV LANG=en_US.utf8
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone && \
apt-get update && \
apt-get install -y locales && \
rm -rf /var/lib/apt/lists/* && \
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \
apt-get update && \
apt-get install -y vim
RUN git clone https://github.com/pwndbg/pwndbg.git && cd pwndbg && ./setup.sh
# install custom debugging scripts for gdb
COPY debugging/gdbinit /root/.gdbinit
COPY debugging/breakpoints debugging/showmem.py ./
# util scripts
COPY scripts/attach_exim.sh scripts/run_exim.sh ./
CMD ["/bin/bash"]