1. Docker를 조작하려면?
터미널에서 명령어를 통해 Docker를 조작 (CLI)
2. Nginx 란?
Nginx란 여러 기능을 가진 서버 중 하나로, 웹 서버(HTML 웹 페이지를 렌더링 시키는 역할), 로드 밸런싱, 리버스 프록시 역할을 한다.
3. 무적정 따라하면서 Docker 사용해보기
1) Nginx 이미지 다운로드
Docker Hub - nginx : https://hub.docker.com/_/nginx
nginx - Official Image | Docker Hub
Quick reference Supported tags and respective Dockerfile links 1.29.8, mainline, 1, 1.29, latest, 1.29.8-trixie, mainline-trixie, 1-trixie, 1.29-trixie, trixie 1.29.8-perl, mainline-perl, 1-perl, 1.29-perl, perl, 1.29.8-trixie-perl, mainline-trixi
hub.docker.com
$ docker pull nginx
- Windows PowerShell
PS C:\Users\admin> docker pull nginx
Using default tag: latest
latest: Pulling from library/nginx
801a1ad15b4e: Pull complete
3531af2bc2a9: Pull complete
ff048f1f2159: Pull complete
ce776bbcda0d: Pull complete
677c63196868: Pull complete
85c66128325a: Pull complete
4677c2a9a3d4: Pull complete
69989ccd189b: Download complete
54c38c75806e: Download complete
Digest: sha256:6e23479198b998e5e25921dff8455837c7636a67111a04a635cf1bb363d199dc
Status: Downloaded newer image for nginx:latest
docker.io/library/nginx:latest
What's next:
View a summary of image vulnerabilities and recommendations → docker scout quickview nginx
2) 다운로드 된 이미지 확인
$ docker image ls
- Windows PowerShell
PS C:\Users\admin> docker image ls
i Info → U In Use
IMAGE ID DISK USAGE CONTENT SIZE EXTRA
nginx:latest 6e23479198b9 240MB 65.8MB
3) 이미지를 컨테이너에 올려 Nginx 서버 실행
$ docker run --name webserver -d -p 80:80 nginx
- Windows PowerShell
PS C:\Users\admin> docker run --name webserver -d -p 80:80 nginx
d8b8a89f1e1db4d98f82f3238c7d84a9c7b1ddea51a1af7e12a1e366eb1464ef
4) Nginx 서버가 잘 실행되는 지 확인
브라우저에서 http://localhost:80/ 접속

5) 실행되고 있는 모든 컨테이너 상태 확인
$ docker ps
- Windows PowerShell
PS C:\Users\admin> docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d8b8a89f1e1d nginx "/docker-entrypoint.…" 3 minutes ago Up 3 minutes 0.0.0.0:80->80/tcp, [::]:80->80/tcp webserver
6) 특정 컨테이너 정지
$ docker stop webserver
- Windows PowerShell
PS C:\Users\admin> docker stop webserver
webserver
이후 브라우저에서 http://localhost:80/ 접속하면 Nginx 서버가 종료된 것을 확인할 수 있다.


비전공자도 이해할 수 있는 Docker 입문/실전| JSCODE 박재성 - 인프런 강의
현재 평점 4.9점 수강생 14,438명인 강의를 만나보세요. 비전공자 입장에서도 쉽게 이해할 수 있고, 실전에서 바로 적용 가능한 Docker 입문/실전 강의를 만들어봤습니다! Docker 기본 개념, Spring Boot를
www.inflearn.com
'강의 실습 > 비전공자도 이해할 수 있는 Docker 입문 실전' 카테고리의 다른 글
| 이미지(Image) 조회 / 삭제 (0) | 2026.05.01 |
|---|---|
| 이미지(Image) 다운로드 (1) | 2026.04.29 |
| [보충 자료] 실습할 컴퓨터가 윈도우(Windows) 환경일 경우 (0) | 2026.04.29 |
| Docker 설치 (Windows, Mac OS) (0) | 2026.04.29 |
| Docker란? / 컨테이너(Container)란? / 이미지(Image)란? (0) | 2026.04.27 |
댓글