centos 7 + docker + nginx 설치 과정

1770 단어 DOCKER
1. nginx 미 러 찾기
거울 을 꺼내다
거울 목록 보기
nginx 마 운 트 파일 생 성
[root@VM_0_4_centos ~]# docker search nginx

INDEX       NAME                                                             DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
docker.io   docker.io/nginx                                                  Official build of Nginx.                        8157      [OK]       
docker.io   docker.io/jwilder/nginx-proxy                                    Automated Nginx reverse proxy for docker c...   1296                 [OK]
docker.io   docker.io/richarvey/nginx-php-fpm                                Container running Nginx + PHP-FPM capable ...   530                  [OK]
    다음은 nginx. conf 설정 파일 입 니 다.
용기 시동
용기 작 동 여부 확인
[root@VM_0_4_centos ~]# docker pull nginx
Using default tag: latest
Trying to pull repository docker.io/library/nginx ... 
latest: Pulling from docker.io/library/nginx


Digest: sha256:f6e250eaa36af608af9ed1e4751f063f0ca0f5310b1a5d3ad9583047256f37f6

7. 용기 상태 가 Exited 인 것 을 발견 하고 로 그 를 열 어 보기
[root@VM_0_4_centos ~]# docker images
REPOSITORY                             TAG                 IMAGE ID            CREATED             SIZE
docker.io/nginx                        latest              73acd1f0cfad        5 days ago          108.6 MB
docker.io/mysql                        latest              5195076672a7        5 days ago          371.4 MB

8. 일지 에 따라 문 제 를 잘못 해결 합 니 다.
vi / usr / local / software / nginx / conf / nginx. conf (위 에 붙 어 있 는 프로필 코드 는 수 정 된 것 입 니 다)
9. 용기 재 부팅 (페이지 접근 성공)
cd /usr/local/software
mkdir nginx
cd nginx
mkdir www logs conf
cd conf
vi nginx.conf

좋은 웹페이지 즐겨찾기