Notice
Recent Posts
Recent Comments
Link
250x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- spring
- Linux
- Spring Boot
- jenkins 설치
- grafana
- IntelliJ
- jenkins github 연동
- CI/CD
- jenkins install
- Docker
- docker network
- vue.js
- grpc
- JavaScript
- nginx
- 리액트
- error
- jpa
- jenkins github
- jenkins maven
- MySQL
- gradle
- jenkins jdk
- REACT
- MongoDB
- java
- subnetmask
- Jenkins Pipeline
- Jenkins
- 리눅스
Archives
- Today
- Total
뭐든 즐기면서 ;)
Docker NginX 설치 및 설정하기 본문
728x90
1. NginX 설치 명령어
# nginx:latest version 이미지 가져오기
> docker pull nginx
# docker run [--name 컨테이너 명칭] -d -p [remote server port]:[docker 네트워크 port] [이미지명]
> docker run --name nginx -d -p 80:80 nginx
2. NginX 페이지 띄워보기
3. Docker 내부의 NginX 접근
> docker exec -it [name || 컨테이너ID] /bin/sh
# 컨테이너에서 나오기
> ctrl + d
4. NginX 설정 파일 수정
# pwd
/ (처음 container 진입하면 container 내에 root 경로로 진입한다.)
<!-- nginx.conf 파일이 있는 곳으로 이동하여 파일 열기 -->
# cd /etc/nginx
# vim nginx.conf
* nginx.conf 파일 수정은 참고하여 직접 수정해 주시면 됩니다. https://tadaiswhatever.tistory.com/94
* 만약 vim 명령어가 없다고 하면, 설치해 주어야 합니다.
# apt-get update
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 Packages [8184 kB]
Get:5 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [187 kB]
Get:6 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [6344 B]
Fetched 8586 kB in 2s (5178 kB/s)
Reading package lists... Done
# apt-get install vim
728x90
'서버 > Docker' 카테고리의 다른 글
docker log 위치 (0) | 2024.01.10 |
---|---|
Erro : WARNING: IPv4 forwarding is disabled. Networking will not work. (0) | 2022.10.12 |
Docker network 설정 (0) | 2022.10.06 |
CentOS Docker install / CentOS Docker 설치 (0) | 2022.10.06 |
Comments