본문 바로가기

빅데이터

alpine telegraf 도커 생성

아래 리포지토리를 참고하여 생성하였습니다.

github.com/container-examples/alpine-telegraf

 

container-examples/alpine-telegraf

Docker image Telegraf (Alpine). Contribute to container-examples/alpine-telegraf development by creating an account on GitHub.

github.com

FROM alpine:3.7

ENV TELEGRAF_VERSION 1.18.1

WORKDIR /scripts

ADD https://dl.influxdata.com/telegraf/releases/telegraf-${TELEGRAF_VERSION}_static_linux_amd64.tar.gz ./

COPY ./scripts/start.sh start.sh
COPY ./configs/telegraf.conf telegraf.conf

# Installing packages
RUN tar -C . -xzf telegraf-${TELEGRAF_VERSION}_static_linux_amd64.tar.gz
RUN chmod +x telegraf-${TELEGRAF_VERSION}/usr/bin/telegraf
RUN chmod +x start.sh
RUN cp telegraf-${TELEGRAF_VERSION}/usr/bin/telegraf /usr/bin/
RUN rm -rf *.tar.gz* telegraf-${TELEGRAF_VERSION}/

ENTRYPOINT [ "./start.sh" ]

alpine에 telegraf linux amd64 실행파일 다운로드, 스크립트 추가해서 start.sh를 통해 실행!

 

수정한 레포지토리

-> github.com/AndersonChoi/alpine-telegraf

 

AndersonChoi/alpine-telegraf

alpine telegraf docker file. Contribute to AndersonChoi/alpine-telegraf development by creating an account on GitHub.

github.com

 

반응형