Windows에 WSL로 Docker 구축
설치 방법
1. CentOS 설치(CentoOS 7버전으로 설치)
docker pull centos:7
docker run --privileged -d --name mycentos72 centos:7 /sbin/init
docker exec -it mycentos72 /bin/bash
- centos 7버전 이미지 다운로드
- docker run --privileged 옵션은 systemctl 명령어 사용시 "Failed to get D-Bus connection: Operation not permitted" 에러가 발생을 해결하기 위해 privileged 모드로 실행
- mycentos72 이름의 컨테이너로 접속하여 /bin/bash 실행
2. td-agent 설치
yum install sudo
curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent4.sh | sh
3. td-agent.conf 파일 설정 확인
-샘플코드-
<source>
@id in_forward
@type forward
port 24224
</source>
<match test.**>
@type stdout
</match>
4. 서비스 시작
systemctl start td-agent
systemctl status td-agent
ps -ef | grep td-agent | grep -v grep
5. 로그 전송 테스트
echo '{"user":"1","message":"hello world."}' | /opt/td-agent/bin/fluent-cat debug.test
docker 설치
https://docs.fluentd.org/container-deployment/install-by-docker
'IT 기본' 카테고리의 다른 글
wsl에서 docker 에러 "cgroups: cannot find cgroup mount destination" (0) | 2022.12.05 |
---|---|
도커 정리 (0) | 2022.09.08 |
파이참의 Git 참고사항 (0) | 2022.07.18 |
wsl docker에서 Sql server 설치 (0) | 2021.10.27 |
WSL2설치와 docker 설치 (0) | 2021.09.15 |