2. Đóng gói Docker Image và chạy thành container với Portainer
2020, Apr 10
sample_stack
123456789
version"3.7"
services
sample
image registry.tn20.wedesign.vn/simple latest
deploy
restart_policy
condition none
Dockerfile
123
FROM ubuntu:16.04
ENTRYPOINT [ "echo", "Hello from my docker"]
login_docker_hub
1
docker login
build_image
1
docker build -t codemantn/hello:latest .
run_image_for_dev_or_test
1
docker run codemantn/hello:latest
docker_push_image_to_docker_hub
1
docker push codemantn/hello:latest
🎸 Your actions
- Start/Stop/Pause/Resume container
- Xóa bớt các image không cần thiết
- Đóng gói image có source code của bạn
- Phân tích thử image đã build (export về file zip)
- Tạo/Sử dụng Docker Private Registry (Auth)
🔶 Keep in touch!
- For issues, optimizations, best practices, updates: codemantn/community - Gitter
- Resource: Downloads
- Resource: GitHub