Dockerfile

Docker 2018. 12. 11. 06:19

포너블 및 디버깅을 위한 도커 이미지 ㅋ

docker build -t ubuntu:18.04 .

FROM ubuntu:18.04
MAINTAINER alkyne

ENV DEBIAN_FRONTEND=noninteractive
RUN sed -ie 's/archive.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

RUN pip install --upgrade pip && pip2 install --no-cache-dir --upgrade pwntools

RUN gem install one_gadget seccomp-tools heapinfo

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 -p  [HOSTPORT:CONTAINERPORT] -h [HOSTNAME] --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --privileged --name [docker_name] -it ubuntu:18.04 /bin/bash


'Docker' 카테고리의 다른 글

Dockerfile  (0) 2018.12.11
docker 명령어 정리  (0) 2018.11.02
Posted by 범고래_1

댓글을 달아 주세요