docker exec [options] CONTAINER COMMAND
-d, --detach # run in background
-i, --interactive # stdin
-t, --tty # interactive
5
docker build [options] .-t "app/container_name"# name
Tạo một
docker exec [options] CONTAINER COMMAND-d, --detach# run in background-i, --interactive# stdin-t, --tty# interactive
6 từ Dockerfile.
docker exec [options] CONTAINER COMMAND
-d, --detach # run in background
-i, --interactive # stdin
-t, --tty # interactive
7
docker run [options] IMAGE# see `docker create` for options
Chạy một lệnh trong một
docker exec [options] CONTAINER COMMAND-d, --detach# run in background-i, --interactive# stdin-t, --tty# interactive
6.
Quản lý container
docker exec [options] CONTAINER COMMAND
-d, --detach # run in background
-i, --interactive # stdin
-t, --tty # interactive
9
docker create [options] IMAGE-a, --attach# attach stdout/err-i, --interactive# attach stdin (interactive)-t, --tty# pseudo-tty--name NAME# name your image-p, --publish 5000:5000# port map--expose 5432# expose a port to linked containers-P, --publish-all# publish all ports--link container:alias# linking-v, --volume `pwd`:/app# mount (absolute paths needed)-e, --env NAME=hello# env vars
docker run [options] IMAGE# see `docker create` for options
0
Biến
docker run [options] IMAGE# see `docker create` for options
1
docker run [options] IMAGE# see `docker create` for options
2
Khởi tạo
docker run [options] IMAGE# see `docker create` for options
3
Onbuild
docker run [options] IMAGE# see `docker create` for options
4
Lệnh
docker run [options] IMAGE# see `docker create` for options
5
Nhập cảnh
Định cấu hình một container sẽ chạy như một thực thi.
Điều này sẽ sử dụng xử lý vỏ để thay thế các biến shell và sẽ bỏ qua bất kỳ đối số dòng lệnh docker start [options] CONTAINER
-a, --attach # attach stdout/err
-i, --interactive # attach stdin
docker stop [options] CONTAINER
2 hoặc docker exec [options] CONTAINER COMMAND
-d, --detach # run in background
-i, --interactive # stdin
-t, --tty # interactive
7 nào.
docker run [options] IMAGE# see `docker create` for options
6
docker run [options] IMAGE# see `docker create` for options
7
metadata
Xem thêm
docker-compose
https://docs.docker.com/engine/reference/Builder/
docker run [options] IMAGE# see `docker create` for options
8
Onbuild
docker run [options] IMAGE# see `docker create` for options
9
docker create [options] IMAGE-a, --attach# attach stdout/err-i, --interactive# attach stdin (interactive)-t, --tty# pseudo-tty--name NAME# name your image-p, --publish 5000:5000# port map--expose 5432# expose a port to linked containers-P, --publish-all# publish all ports--link container:alias# linking-v, --volume `pwd`:/app# mount (absolute paths needed)-e, --env NAME=hello# env vars
0
docker create [options] IMAGE-a, --attach# attach stdout/err-i, --interactive# attach stdin (interactive)-t, --tty# pseudo-tty--name NAME# name your image-p, --publish 5000:5000# port map--expose 5432# expose a port to linked containers-P, --publish-all# publish all ports--link container:alias# linking-v, --volume `pwd`:/app# mount (absolute paths needed)-e, --env NAME=hello# env vars
1
Lệnh
Nhập cảnh
docker create [options] IMAGE-a, --attach# attach stdout/err-i, --interactive# attach stdin (interactive)-t, --tty# pseudo-tty--name NAME# name your image-p, --publish 5000:5000# port map--expose 5432# expose a port to linked containers-P, --publish-all# publish all ports--link container:alias# linking-v, --volume `pwd`:/app# mount (absolute paths needed)-e, --env NAME=hello# env vars
2
docker create [options] IMAGE-a, --attach# attach stdout/err-i, --interactive# attach stdin (interactive)-t, --tty# pseudo-tty--name NAME# name your image-p, --publish 5000:5000# port map--expose 5432# expose a port to linked containers-P, --publish-all# publish all ports--link container:alias# linking-v, --volume `pwd`:/app# mount (absolute paths needed)-e, --env NAME=hello# env vars
3
docker create [options] IMAGE-a, --attach# attach stdout/err-i, --interactive# attach stdin (interactive)-t, --tty# pseudo-tty--name NAME# name your image-p, --publish 5000:5000# port map--expose 5432# expose a port to linked containers-P, --publish-all# publish all ports--link container:alias# linking-v, --volume `pwd`:/app# mount (absolute paths needed)-e, --env NAME=hello# env vars
4
Định cấu hình một container sẽ chạy như một thực thi.
docker create [options] IMAGE-a, --attach# attach stdout/err-i, --interactive# attach stdin (interactive)-t, --tty# pseudo-tty--name NAME# name your image-p, --publish 5000:5000# port map--expose 5432# expose a port to linked containers-P, --publish-all# publish all ports--link container:alias# linking-v, --volume `pwd`:/app# mount (absolute paths needed)-e, --env NAME=hello# env vars
5
docker create [options] IMAGE-a, --attach# attach stdout/err-i, --interactive# attach stdin (interactive)-t, --tty# pseudo-tty--name NAME# name your image-p, --publish 5000:5000# port map--expose 5432# expose a port to linked containers-P, --publish-all# publish all ports--link container:alias# linking-v, --volume `pwd`:/app# mount (absolute paths needed)-e, --env NAME=hello# env vars
6
Onbuild
docker create [options] IMAGE-a, --attach# attach stdout/err-i, --interactive# attach stdin (interactive)-t, --tty# pseudo-tty--name NAME# name your image-p, --publish 5000:5000# port map--expose 5432# expose a port to linked containers-P, --publish-all# publish all ports--link container:alias# linking-v, --volume `pwd`:/app# mount (absolute paths needed)-e, --env NAME=hello# env vars
7
docker create [options] IMAGE-a, --attach# attach stdout/err-i, --interactive# attach stdin (interactive)-t, --tty# pseudo-tty--name NAME# name your image-p, --publish 5000:5000# port map--expose 5432# expose a port to linked containers-P, --publish-all# publish all ports--link container:alias# linking-v, --volume `pwd`:/app# mount (absolute paths needed)-e, --env NAME=hello# env vars
8
Lệnh
docker create [options] IMAGE-a, --attach# attach stdout/err-i, --interactive# attach stdin (interactive)-t, --tty# pseudo-tty--name NAME# name your image-p, --publish 5000:5000# port map--expose 5432# expose a port to linked containers-P, --publish-all# publish all ports--link container:alias# linking-v, --volume `pwd`:/app# mount (absolute paths needed)-e, --env NAME=hello# env vars
Điều này sẽ sử dụng xử lý vỏ để thay thế các biến shell và sẽ bỏ qua bất kỳ đối số dòng lệnh docker start [options] CONTAINER
-a, --attach # attach stdout/err
-i, --interactive # attach stdin
docker stop [options] CONTAINER
2 hoặc docker exec [options] CONTAINER COMMAND
-d, --detach # run in background
-i, --interactive # stdin
-t, --tty # interactive
7 nào.
docker exec [options] CONTAINER COMMAND-d, --detach# run in background-i, --interactive# stdin-t, --tty# interactive
0
Phụ thuộc
docker exec [options] CONTAINER COMMAND-d, --detach# run in background-i, --interactive# stdin-t, --tty# interactive
1
Sự lựa chọn khác
docker exec [options] CONTAINER COMMAND-d, --detach# run in background-i, --interactive# stdin-t, --tty# interactive
2
Các tính năng tiên tiến
Nhãn
Máy chủ DNS
Thiết bị
liện kết ngoại
Chủ nhà
docker exec [options] CONTAINER COMMAND-d, --detach# run in background-i, --interactive# stdin-t, --tty# interactive
3
Sevices
docker exec [options] CONTAINER COMMAND-d, --detach# run in background-i, --interactive# stdin-t, --tty# interactive
4
Để xem danh sách tất cả các dịch vụ chạy trong Swarm
Để xem tất cả các dịch vụ đang chạy
Tại sao chúng ta yêu cầu khối lượng cho Docker?
Khối lượng là cách ưa thích để dữ liệu tồn tại trong các container và dịch vụ docker.Một số trường hợp sử dụng cho tập bao gồm: chia sẻ dữ liệu giữa nhiều thùng chứa đang chạy.Nếu bạn không tạo ra nó một cách rõ ràng, một khối lượng được tạo ngay lần đầu tiên nó được gắn vào một thùng chứa.. Some use cases for volumes include: Sharing data among multiple running containers. If you don't explicitly create it, a volume is created the first time it is mounted into a container.
Chính xác thì Docker làm gì?
Docker là một nền tảng nguồn mở cho phép các nhà phát triển xây dựng, triển khai, chạy, cập nhật và quản lý các container, các thành phần có thể thực thi, có thể thực hiện được kết hợp mã nguồn ứng dụng với thư viện hệ điều hành (OS) và các phụ thuộc cần thiết để chạy mã đó trong bất kỳ môi trường nào.enables developers to build, deploy, run, update and manage containers—standardized, executable components that combine application source code with the operating system (OS) libraries and dependencies required to run that code in any environment.
Docker là gì trong các thuật ngữ đơn giản là gì?
Docker là một nền tảng mở để phát triển, vận chuyển và chạy các ứng dụng.Docker cho phép bạn tách các ứng dụng của mình khỏi cơ sở hạ tầng để bạn có thể cung cấp phần mềm nhanh chóng.Với Docker, bạn có thể quản lý cơ sở hạ tầng của mình theo cùng một cách bạn quản lý các ứng dụng của mình.an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications.