search image
1 | docker search ubuntu |
pull image
1 | docker pull mongo |
image 목록 보기
1 | docker images |
image를 container로 실행
1 | docker run --name mgdb mongo |
실행중인 container에 접속
1 | docker run -d --name mgdb mongo |
dockerfile 만들기
1 | vi dockerfile |
1 | FROM java:openjdk-8u45-jdk |
dockerfile로 image 만들기
1 | docker build -t user_svc . |
container link
1 | docker run -d -p 8081:8081 --link mgdb:mgdb --name user_svc user_svc |
container 중지 및 삭제
1 | docker stop user_svc mgdb |
image 삭제
1 | docker rmi user_svc |
docker compose 설정
1 | vi docker-compose.yml |
1 | users: |
docker compose로 실행
1 | docker-compose up |