Appearance
docker
bash
docker pull centos
docker image list
docker run -i -t centos /bin/bashcentos Setting
bash
yum install wget nano
yum -y install glibc-locale-source glibc-langpack-ennodejs in centos
bash
sudo yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash -
curl -sL https://rpm.nodesource.com/setup_12.x | bash -
yum install -y nodejs
node -v
npm -vgit in centos
bash
yum install gitinit
bash
cd /home
mkdir web
/home/web
git clone ~pm2
bash
npm install -g pm2
pm2 start server.js포트 확인
bash
yum install lsof
lsof -i -nP | grep LISTEN | awk '{print $(NF-1)" "$1}' | sort -u
yum install net-tools
netstat -tnlp
docker run -d --dns 8.8.8.8 --name centos-my centos /sbin/initdocker 실행
bash
docker exec -it centos-my /bin/bash권한 포트 문제가 있을 경우
bash
--cap-add=NET_ADMIN
-p 3013:3013
ps -ef|grep dockerCentOS
bash
yum install iptables
iptables -L -n -v
iptables -P INPUT ACCEPT
docker run --cap-add=NET_ADMIN -it --name centos-my -p 3013:3013 centosdocker에 추가 컨테이너에 포트 추가
bash
docker stop centos-my
docker commit centos-my centos-my2
docker run -p 80:80 -d centos-my2CentOS 7.9 버전
bash
docker pull centos:7.9.2009
docker run -it --name centos-my -p 8080:8080 -p 8081:8081 centos:7.9.2009the input device is not a TTY
bashwinpty docker run -it --name centos-my -p 8080:8080 -p 8081:8081 centos:7.9.2009 docker run -t --name centos-my -p 8080:8080 -p 8081:8081 centos:7.9.2009