jaynamm / docker-hadoop-cluster

Hadoop Cluster For Docker (-ing)
1 stars 0 forks source link

πŸ‘Ώ docker-compose up failed #2

Open jaynamm opened 1 year ago

jaynamm commented 1 year ago

도컀 컴포즈 μ‹€νŒ¨

도컀 컴포즈λ₯Ό 톡해 μ»¨ν…Œμ΄λ„ˆλ₯Ό μ‹€ν–‰ν•˜λ €κ³  ν•˜λ‹ˆ λ‹€μŒκ³Ό 같이 λ°”λ‘œ μ’…λ£Œλ˜μ—ˆλ‹€.
μ•„λ§ˆλ„ λ¬Έμ œλŠ” 도컀 컴포즈둜 μ»¨ν…Œμ΄λ„ˆλ₯Ό λ™μ‹œμ— λ„μš°λŠ” κ³Όμ •μ—μ„œ 무슨 섀정에 λ¬Έμ œκ°€ μžˆλŠ”κ²Œ μ•„λ‹κΉŒ 싢은데... λ‚΄κ°€ 도컀 μ»΄ν¬μ¦ˆμ— λŒ€ν•œ 이해가 λΆ€μ‘±ν•˜λ‹€λ³΄λ‹ˆ 쑰금 더 μ•Œμ•„λ³΄κ³  μ΄ν•΄ν•˜λŠ” μ‹œκ°„μ΄ ν•„μš”ν•΄λ³΄μΈλ‹€.

docker-compose μ‹€ν–‰ κ²°κ³Ό

$ docker-compose up
[+] Running 4/0
 βœ” Container dn1  Created                                                                                                                             0.1s 
 βœ” Container nn   Created                                                                                                                             0.1s 
 βœ” Container dn2  Created                                                                                                                             0.1s 
 βœ” Container dn3  Created                                                                                                                             0.1s 
Attaching to dn1, dn2, dn3, nn
dn2 exited with code 0
dn1 exited with code 0
dn3 exited with code 0
nn exited with code 0

docker-compose.yaml

도컀 컴포즈 νŒŒμΌμ€ λ‹€μŒκ³Ό κ°™λ‹€.

version: '3.8'

services:
  nn:
    image: hadoop-base:latest
    container_name: nn
    hostname: nn
    restart: always
    ports:
      - 50070:50070
      - 9000:9000
    entrypoint: /opt/hadoop/entrypoint.sh
    networks:
      - bridge

  dn1:
    image: hadoop-base:latest
    container_name: dn1
    hostname: dn1
    entrypoint: /opt/hadoop/entrypoint.sh
    networks:
      - bridge

  dn2:
    image: hadoop-base:latest
    container_name: dn2
    hostname: dn2
    entrypoint: /opt/hadoop/entrypoint.sh
    networks:
      - bridge

  dn3:
    image: hadoop-base:latest
    container_name: dn3
    hostname: dn3
    entrypoint: /opt/hadoop/entrypoint.sh
    networks:
      - bridge

networks:
  bridge:
jaynamm commented 1 year ago

docker-compose ν›„ λ°”λ‘œ 정상 μ’…λ£Œλ˜λŠ” 뢀뢄에 λŒ€ν•΄μ„œ μ°Ύμ•„λ³΄λ‹ˆ μ»¨ν…Œμ΄λ„ˆκ°€ ν•˜λ‚˜μ˜ λͺ…령을 μ‹€ν–‰ν•œ ν›„ 정상 μ’…λ£Œ λ˜λŠ” κ²ƒμœΌλ‘œ 보인닀.
λ”°λΌμ„œ ν•΄λ‹Ή 뢀뢄이 λ°”λ‘œ μ’…λ£Œλ˜μ§€ μ•Šλ„λ‘ 두 개의 μ˜΅μ…˜μ„ μΆ”κ°€ν•΄μ„œ λ°”λ‘œ μ’…λ£Œλ˜μ§€ μ•Šλ„λ‘ ν•΄μ£Όμ—ˆλ‹€.

tty: true
stdin-open: true

ν•΄λ‹Ή λ‚΄μš©μ— λŒ€ν•΄μ„œ λΈ”λ‘œκ·Έμ— μ •λ¦¬ν•΄λ‘μ—ˆλ‹€.
https://jaynamm.tistory.com/entry/docker-compose-%EC%8B%A4%ED%96%89%EA%B3%BC-%EB%8F%99%EC%8B%9C%EC%97%90-%EC%A2%85%EB%A3%8Cexited-with-code-0