포너블 및 디버깅을 위한 도커 이미지 ㅋ
docker build -t ubuntu:18.04 .
FROM ubuntu:18.04
MAINTAINER alkyne
ENV DEBIAN_FRONTEND=noninteractive
RUN sed -ie 's/kr.archive.ubuntu.com/mirror.kakao.com/g' /etc/apt/sources.list
RUN sed -ie 's/us.archive.ubuntu.com/mirror.kakao.com/g' /etc/apt/sources.list
RUN sed -ie 's/archive.ubuntu.com/mirror.kakao.com/g' /etc/apt/sources.list
RUN sed -ie 's/security.ubuntu.com/mirror.kakao.com/g' /etc/apt/sources.list
WORKDIR /root
RUN dpkg --add-architecture i386
RUN apt-get -y update && apt-get install -y locales vim gdb \
python2.7 python-pip python-dev git libssl-dev libffi-dev build-essential lrzsz ssh libc6-dbg libc6-dbg:i386 libc6:i386 libncurses5:i386 libstdc++6:i386 zlib1g:i386 ltrace strace ruby-dev net-tools tmux gcc-multilib g++-multilib
RUN pip install --upgrade pip && pip2 install --no-cache-dir --upgrade pwntools
RUN gem install one_gadget
RUN rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
RUN git clone https://github.com/longld/peda.git ~/peda && echo "source ~/peda/peda.py" >> ~/.gdbinit
RUN git clone https://github.com/scwuaptx/Pwngdb.git && cp ~/Pwngdb/.gdbinit ~/
RUN git clone git://github.com/Mipu94/peda-heap.git ~/peda-heap && echo "source ~/peda-heap/peda.py" >> ~/.gdbinit
ENV LANG en_US.utf8
EXPOSE 22
CMD rm -rf .cache
docker compose는 이정도면 될듯 하다.
docker run -w [WORKING_DIR] -p [HOSTPORT:CONTAINERPORT] -h [HOSTNAME] --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged --name [docker_name] -it ubuntu:18.04 /bin/bash
'Docker' 카테고리의 다른 글
Docker commit, push (컨테이너를 이미지로) (0) | 2020.02.19 |
---|---|
docker 명령어 정리 (0) | 2018.11.02 |