본문 바로가기

728x90

2021/11

[Linux] How to build and push Docker images with GitHub Actions How to build and push Docker images with GitHub Actions Create a new repository for GitHub new repository > Actions > set up a workflow yourself Editing main.yml editing name: CI on: push: branches: [ main ] jobs: build: runs-on: ubuntu-latest steps: - name: Check Out Repo uses: actions/checkout@v2 - name: Login to Docker Hub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_HUB_US.. 더보기
Installing a package to use the Kafka command(kafka-topics.sh) Installing a package to use the Kafka command(kafka-topics.sh) Install Azul Zulu on RPM-based Linux(CentOS 7) https://docs.azul.com/core/zulu-openjdk/install/rpm-based-linux Install from Azul RPM repository yum install -y https://cdn.azul.com/zulu/bin/zulu-repo-1.0.0-1.noarch.rpm Install the required Azul Zulu package yum install -y zulu11-jdk Check the java version /usr/lib/jvm/zulu11/bin/java .. 더보기
Kafka Broker 및 ZooKeeper의 버전을 확인하는 방법 Kafka Broker 및 ZooKeeper의 버전을 확인하는 방법 Kafka Broker 버전 확인 kafka-server-start.sh --version ZooKeeper 버전 확인 zkServer.sh --version 또는 zookeeper-server-status 이러한 명령어를 사용하여 Kafka Broker 및 ZooKeeper의 현재 설치된 버전을 확인할 수 있습니다. Kafka(Broker) version find /usr/share/java/kafka/ -name \*kafka_\* | head -1 | grep -o '\kafka[^\n]*' $ find /usr/share/java/kafka/ -name \*kafka_\* | head -1 | grep -o '\kafka[^\n].. 더보기
도커 컨테이너 터미널 프롬프트(PS1) 색상 변경 도커 컨테이너 터미널 프롬프트(PS1) 색상 변경 Dockerfile에서 컨테이너 내에서 사용할 터미널 프롬프트(PS1)를 설정하려면 Dockerfile 내에서 ENV 지시문을 사용하여 PS1 환경 변수를 설정할 수 있습니다. Dockerfile 파일 생성 vim Dockerfile FROM centos:7 LABEL website="sangchul.kr" ENV PS1="\[\e[33m\]\u\[\e[m\]\[\e[37m\]@\[\e[m\]\[\e[34m\]\h\[\e[m\]:\[\033[01;31m\]\W\[\e[m\]$ " RUN echo 'PS1=$PS1' >> ~/.bashrc Docker 이미지 빌드 docker build --tag centos-ps1:0.1 . 컨테이너 실행 docker r.. 더보기
docker rmi 명령어 docker rmi 명령어 모든 이미지 삭제 docker rmi -f $(docker images -q) untagged 이미지만 조회 docker images -f "dangling=true" -q docker image untagged(none) 삭제 docker rmi $(docker images -f "dangling=true" -q) docker image 필터 적용 reference="registry.binddns.com/playground/elasticsearch:*" docker images -q --filter=reference="registry.binddns.com/playground/elasticsearch:*" $ docker images -q --filter=reference="r.. 더보기
[리눅스] 도커 컨테이너 IP 테이블 설정 실패 오류: IP 테이블 설정 실패: SKIP DNAT 규칙을 활성화할 수 없습니다. 그 이유는 방화벽(systemctl stop firewalld)이 꺼진 후 도커를 다시 시작해야 하기 때문입니다. (docker 데몬 운영 중에 firewalld 데몬을 내려서 발생한 에러입니다.) 도커 서비스 재시작 $ systemctl restart docker.service [오류 현상] docker run -it --rm centos:7 /bin/bash 도커 컨테이너 실행 후 구글 DNS로 ping 체크가 안 되고 있음 $ docker run -it --rm centos:7 /bin/bash Unable to find image 'centos:7' locally 7: Pulling from library/centos.. 더보기
HAProxy 로깅(haproxy logging) 설정하는 방법 HAProxy 로깅(haproxy logging) 설정하는 방법 HAProxy는 로드 밸런서 및 프록시 서버로 사용되는 오픈 소스 소프트웨어입니다. 로깅은 HAProxy에서 중요한 기능 중 하나로, 문제 해결 및 성능 모니터링을 위해 필요합니다. HAProxy의 로깅은 기본적으로 로그 파일 또는 로그 서버로 전송하는 방식으로 설정할 수 있습니다. HAProxy 로깅 설정 방법 로그 형식 정의하기 HAProxy는 로그를 기록할 때 사용할 로그 형식을 정의해야 합니다. 로그 형식은 원하는 정보를 포함하는 서식으로 구성됩니다. 예를 들어, IP 주소, 시간, 요청 메서드, 상태 코드 등을 포함할 수 있습니다. 로그 형식은 log-format 설정으로 정의합니다. 로그 목적지 선택하기 로그는 로그 파일 또는 원.. 더보기
CentOS 7에서 HAProxy를 설치하고 구성하는 방법 CentOS 7에서 HAProxy를 설치하고 구성하는 방법 다이어그램(diagram) 1. HAProxy 설치 HAProxy를 설치합니다. sudo yum install -y haproxy $ haproxy -v HA-Proxy version 1.5.18 2016/05/10 Copyright 2000-2016 Willy Tarreau 2. HAProxy 구성 파일 편집 /etc/haproxy/haproxy.cfg 파일을 편집하여 로드 밸런서를 구성합니다. haproxy.cfg 편집(default) $ cat /etc/haproxy/haproxy.cfg #--------------------------------------------------------------------- # Example confi.. 더보기

728x90