linux에서 docker 기본 사용법

2022. 9. 13. 14:53·Tips & theory
728x90
반응형

1. image build

앞선 글과 동일하게 터미널에서

docker build -t 이름:태그 -f dockerfile명 .

을 입력하면 된다.

 

https://wyv3rn.tistory.com/148?category=949848 

 

system hacking을 위한 docker 설치 및 사용법

1. 서론. 지금까지 kali linux가 멋져보여 이를 사용해 모든 pwnable 문제를 풀고 있었다. 하지만 가면 갈수록 libc version matching 및 분석의 어려움을 느낌과 동시에 최근 ctf 트렌드 상 docker 사용이 필수

wyv3rn.tistory.com

 

2. 만들어진 image 확인

아래 명령어 실행.

docker image ls

 

┌──(kali㉿kali)-[~/Downloads]
└─$ sudo docker image ls                                                                              
REPOSITORY   TAG       IMAGE ID       CREATED        SIZE
ctf          20.04     e6dad86542f2   16 hours ago   1.1GB
ubuntu       <none>    2b4cba85892a   6 months ago   72.8MB

 

3. image 실행

-d 옵션은 back ground 실행의 의미이다.

sudo docker run -itd ctf:20.04

만일 -d 옵션을 안붙이면 터미널은 image를 실행한 상태로 멈춰있게 된다.

image를 실행하면 container로 넘어가게 된다.

 

4. container 접속

sh을 사용해서 해당 컨테이너에 접속. zsh나 bash2나 어쨌던 깔려있는거 쓰면 된다.

docker exec -it d34e189ea55b sh

 

728x90
반응형
저작자표시 비영리 변경금지 (새창열림)

'Tips & theory' 카테고리의 다른 글

gdb core 파일이 생성되지 않을 때  (0) 2022.09.16
House of force  (0) 2022.09.14
assembly code 기초  (0) 2022.09.08
docker <-> host 파일 전송  (0) 2022.09.06
system hacking을 위한 docker 설치 및 사용법  (0) 2022.09.05
'Tips & theory' 카테고리의 다른 글
  • gdb core 파일이 생성되지 않을 때
  • House of force
  • assembly code 기초
  • docker <-> host 파일 전송
wyv3rn
wyv3rn
아저씨의 흔한 취미. wyv3rn#1249
  • wyv3rn
    think storage
    wyv3rn
  • 전체
    오늘
    어제
    • 분류 전체보기 (513)
      • To do list (7)
        • Doing (1)
        • Complete (6)
      • Diary (35)
      • Tips & theory (74)
      • Kernel Exploit (27)
        • Theory (15)
        • Exercise (5)
      • File Structure (6)
      • Wargame (320) N
        • pwn.college (34)
        • Dreamhack (154) N
        • pwnable.kr (15)
        • Lord of Sqlinjection (4)
        • Cryptohack (20)
        • Root me (27)
        • CodeEngn (4)
        • Exploit Education (22)
        • ROP Emporium (8)
        • H4C (10)
        • Hackerchool (22)
      • CTF (44)
        • Solved (42)
        • Unsolved (2)
      • Script (0)
      • RubiyaLap (0)
  • 블로그 메뉴

    • 홈
    • 방명록
  • 링크

  • 공지사항

    • PWN wargame 모음 (및 느낀점)
    • 비공개 글들에 대해.
    • 뭐라도 하나 얻어가시길...
  • 인기 글

  • 태그

    root
    pwntools
    _IO_FILE
    cryptohack
    RTL
    vtable
    32bit
    x64
    BOF
    tcache
    phoenix
    exploit education
    pwnable.kr
    FSB
    Me
    Buffer Overflow
    Format String Bug
    lob
    libc
    la ctf
    64bit
    hackerschool
    root-me
    docker
    dreamhack
    ROOT ME
    heap
    x86
    rop
    CANARY
  • 최근 댓글

  • 최근 글

  • 250x250
    반응형
  • hELLO· Designed By정상우.v4.10.3
wyv3rn
linux에서 docker 기본 사용법
상단으로

티스토리툴바