-
Notifications
You must be signed in to change notification settings - Fork 60
/
.dockerfile_dbg
50 lines (39 loc) · 1.07 KB
/
.dockerfile_dbg
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
FROM like_dbg_base:latest
LABEL maintainer="Christopher Krah <[email protected]>"
ENV DEBIAN_FRONTEND noninteractive
ARG USER
WORKDIR /home/$USER
COPY io/scripts/.gdbinit .
COPY io/scripts/debugger.sh .
COPY io/scripts/gdb_script .
RUN apt-get update && \
set -e && \
apt-get install -yq --no-install-recommends \
libc-dev \
binutils \
libssl-dev \
libffi-dev \
gdb-multiarch \
ltrace \
strace \
ca-certificates \
procps \
libc6-dev && \
python3 -m pip install --upgrade --no-cache-dir pwntools && \
apt-get -y autoremove --purge && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
chown $USER:$USER .gdbinit debugger.sh
ENV LC_ALL=en_US.UTF-8
USER $USER
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
COPY io/scripts/like_debugger_tool_install.sh .
RUN ./like_debugger_tool_install.sh
# Set Zsh as the default shell for the user
USER root
RUN chsh -s $(which zsh) $USER
USER $USER
# Copy necessary scripts
COPY io/scripts/gdb_script .
# Set working directory
WORKDIR /io