본문 바로가기

전체 글

(268)
[Docker] Priviate registry 구성 #3 - 인증 구성 개요 구성환경 Docker version 19.03.5, registry 2.7.1 1. 인증 사용자/패스워드 생성 shell> mkdir /opt/registry/auth/ => htpaswd 파일이 저장될 디렉토리 shell> docker run --entrypoint htpasswd registry:2.7.1 -Bbn "user1" "password123" > /opt/registry/auth/htpasswd 2. Registry 서버 인증을 사용하여 기동 docker run -d \ --restart=always \ --name registry \ -v /opt/registry/certs:/certs \ -v /opt/registry/auth:/auth \ -e REGISTRY_AUTH=htpas..
[Docker] Private registry 이미지 삭제 개요 Reigistry의 이미지를 삭제하는 방법은 리포지토리(repository)내의 지정 버전(Tag)를 삭제, 리포지토리 삭제 두가지의 방법이 있다. 이 두가지 방법에 대해서 알아보도록 한다. 구성환경 Docker 19.03.5 , Registry 2.7.1 리포지토리내 지정 버전(Tag) 삭제 방법 1 : registry REST API 를 이용한 방법 *** curl 명령어로 이미지 삭제하고자 할때, Registry 서비스 시작시 -e REGISTRY_STORAGE_DELETE_ENABLED=true 환경변수를 지정하여야 한다. 1. 리포지토리 조회 - Usage : curl -X GET shell> curl -X GET https://registry.hoya.com/v2/_catalog {"re..
[kubernetes] NFS 구성 개요 kubernetes에서 지원하는 많은 볼륨중, 가장 많이 쓰이고 효율적인 NFS를 이용하여 파드를 구성하는 방법을 예로 들어 구성해보도록 한다. 구성환경 kubernetes 1.17.4, Docker 19.03.8 구성 절차 1. nfs 서버/클라이언트 구성 2. 이미지 빌드 및 registry 등록 3. 디플로이먼트 및 서비스 생성 1. NFS 구성 1.1 NFS 서버 - nfs 마운트 포인트 지점및 html Document Root 디렉토리, html파일 생성 shell> mkdir -p /opt/nfsvolumes/html shell> vi /opt/nfsvolumes/html/index.html - /etc/exports 파일 /opt/nfsvolumes *(rw,no_root_squash,..
[Docker] Priviate registry 구성 #2 - TLS 구성 개요 Registry 서버는 디폴트로 HTTP 통신을 하여 이미지를 업로드 및 다운로드를 한다. 근데 클라이언트는 기본적으로 이미지를 다운로드 할때 HTTPS를 이용한다. 이럴 경우 클라이언트의 daemon.json 파일에 Registry 주소를 추가해는 약간의 번거러움이 있을 뿐만아니라, 안전한 통신을 위해서라도 HTTPS를 추천한다. 구성환경 Docker 19.03, Regsitry 2.7.1 참조 : https://docs.docker.com/registry/deploying/ 구성절차 1. Registry 설치 2. 인증서 생성(사설 인증서) 3. TLS 인증서를 사용해서 Registry 컨테이너 시작 4. 이미지 업로드, 다운로드 테스트 1. Registry 설치 shell> docke pull..
[Docker] Priviate registry 구성 #1 - 설치 개요 구성환경 docker 1.6+, registry 2.7.1 구성절차 1. registry 이미지 다운로드 2. 로컬 레지스트리 실행 3. 이미지 업로드 4. 이미지 다운로드 1. Registry 이미지 다운로드 Usage: docker pull rgistry:2.7.1 - 샘플 출력 shell> docker pull registry:2.7.1 2.7.1: Pulling from library/registry 486039affc0a: Pull complete ba51a3b098e6: Pull complete 8bb4c43d6c8e: Pull complete 6f5f453e5f2d: Pull complete 42bc10b72f42: Pull complete Digest: sha256:7d081088e4..
[Linux] NFS 구성 개요 구성환경 CetnOS 7.6, nfs-utils-1.3 NFS 구성절차 1. NFS 서버 구성 2. NFS 설정(/etc/exports) 3. NFS 클라이언트 구성 1. NFS 서버 구성 1.1 NFS 서버 설치 shell> yum install nfs-utils 1.2 서비스 활성화 및 시작 shell> systemctl enable --now nfs 2. NFS 설정 2.1 NFS 설정은 /etc/exports 파일에서 설정가능하다 공유폴더 접근노드(옵션) 예) # sample /etc/exports file / master(rw) trusty(rw,no_root_squash) /projects proj*.local.domain(rw) /usr *.local.domain(ro) @trusted..
[kubernetes] TroubelShooting 개요 구성환경 예제 1. - 증상 1 pod의 이벤트에 node.kubernetes.io/disk-pressure로 표시되고 pod가 pending상태로 있음 shell> kubectl describe pod nginx-deployment-57f4c486cc-8kkhm Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning FailedScheduling 40s (x7 over 7m25s) default-scheduler 0/1 nodes are available: 1 node(s) had taint {node.kubernetes.io/disk-pressure: }, that the pod didn't tolerate. - 증상..
[Docker] Image Build 개요 구성환경 Docker-19.3.0, CentOS 6.7 참조 : https://docs.docker.com/engine/reference/builder/ 예제 1) apache httpd 이미지 빌드 1. image 다운로드 shell> docker pull httpd:2.4.41 2. Dockerfile 편집 FROM httpd:2.4.41 MAINTAINER admin@hoya.com WORKDIR /usr/local/apache2 COPY index.html htdocs/index.html ADD zip.tar.gz htdocs/ FROM : 이미지 MAINTAINER : 새 레이어의 Author 필드 설정 WORKDIR : 새 레이어의 디렉토리로 이동 RUN : RUN 명령은 현재 이미지 위..