目录搜索
ComposeAbout versions and upgrading (Compose)ASP.NET Core + SQL Server on Linux (Compose)CLI environment variables (Compose)Command-line completion (Compose)Compose(组成)Compose command-line reference(组合命令行参考)Control startup order (Compose)Django and PostgreSQL (Compose)Docker stacks and distributed application bundles (Compose)docker-compose build(docker-compose构建)docker-compose bundledocker-compose configdocker-compose createdocker-compose downdocker-compose eventsdocker-compose execdocker-compose helpdocker-compose imagesdocker-compose killdocker-compose logsdocker-compose pausedocker-compose portdocker-compose psdocker-compose pulldocker-compose pushdocker-compose restartdocker-compose rmdocker-compose rundocker-compose scaledocker-compose startdocker-compose stopdocker-compose topdocker-compose unpausedocker-compose upEnvironment file (Compose)Environment variables in ComposeExtend services in ComposeFrequently asked questions (Compose)Getting started (Compose)Install ComposeLink environment variables (deprecated) (Compose)Networking in ComposeOverview of Docker ComposeOverview of docker-compose CLIQuickstart: Compose and WordPressRails and PostgreSQL (Compose)Sample apps with ComposeUsing Compose in productionUsing Compose with SwarmEngine.NET Core application (Engine)About images, containers, and storage drivers (Engine)Add nodes to the swarm (Engine)Apply custom metadata (Engine)Apply rolling updates (Engine)apt-cacher-ngBest practices for writing Dockerfiles (Engine)Binaries (Engine)Bind container ports to the host (Engine)Breaking changes (Engine)Build your own bridge (Engine)Configure container DNS (Engine)Configure container DNS in user-defined networks (Engine)CouchDB (Engine)Create a base image (Engine)Create a swarm (Engine)Customize the docker0 bridge (Engine)Debian (Engine)Default bridge networkDelete the service (Engine)Deploy a service (Engine)Deploy services to a swarm (Engine)Deprecated Engine featuresDocker container networking (Engine)Docker overview (Engine)Docker run reference (Engine)Dockerfile reference (Engine)Dockerize an applicationDrain a node (Engine)EngineFAQ (Engine)Fedora (Engine)Get started (Engine)Get started with macvlan network driver (Engine)Get started with multi-host networking (Engine)How nodes work (Engine)How services work (Engine)Image management (Engine)Inspect the service (Engine)Install Docker (Engine)IPv6 with Docker (Engine)Join nodes to a swarm (Engine)Legacy container links (Engine)Lock your swarm (Engine)Manage nodes in a swarm (Engine)Manage sensitive data with Docker secrets (Engine)Manage swarm security with PKI (Engine)Manage swarm service networks (Engine)Migrate to Engine 1.10Optional Linux post-installation steps (Engine)Overview (Engine)PostgreSQL (Engine)Raft consensus in swarm mode (Engine)Riak (Engine)Run Docker Engine in swarm modeScale the service (Engine)SDKs (Engine)Select a storage driver (Engine)Set up for the tutorial (Engine)SSHd (Engine)Storage driver overview (Engine)Store service configuration data (Engine)Swarm administration guide (Engine)Swarm mode key concepts (Engine)Swarm mode overlay network security model (Engine)Swarm mode overview (Engine)Understand container communication (Engine)Use multi-stage builds (Engine)Use swarm mode routing mesh (Engine)Use the AUFS storage driver (Engine)Use the Btrfs storage driver (Engine)Use the Device mapper storage driver (Engine)Use the OverlayFS storage driver (Engine)Use the VFS storage driver (Engine)Use the ZFS storage driver (Engine)Engine: Admin GuideAmazon CloudWatch logs logging driver (Engine)Bind mounts (Engine)Collect Docker metrics with Prometheus (Engine)Configuring and running Docker (Engine)Configuring logging drivers (Engine)Control and configure Docker with systemd (Engine)ETW logging driver (Engine)Fluentd logging driver (Engine)Format command and log output (Engine)Google Cloud logging driver (Engine)Graylog Extended Format (GELF) logging driver (Engine)Journald logging driver (Engine)JSON File logging driver (Engine)Keep containers alive during daemon downtime (Engine)Limit a container's resources (Engine)Link via an ambassador container (Engine)Log tags for logging driver (Engine)Logentries logging driver (Engine)PowerShell DSC usage (Engine)Prune unused Docker objects (Engine)Run multiple services in a container (Engine)Runtime metrics (Engine)Splunk logging driver (Engine)Start containers automatically (Engine)Storage overview (Engine)Syslog logging driver (Engine)tmpfs mountsTroubleshoot volume problems (Engine)Use a logging driver plugin (Engine)Using Ansible (Engine)Using Chef (Engine)Using Puppet (Engine)View a container's logs (Engine)Volumes (Engine)Engine: CLIDaemon CLI reference (dockerd) (Engine)dockerdocker attachdocker builddocker checkpointdocker checkpoint createdocker checkpoint lsdocker checkpoint rmdocker commitdocker configdocker config createdocker config inspectdocker config lsdocker config rmdocker containerdocker container attachdocker container commitdocker container cpdocker container createdocker container diffdocker container execdocker container exportdocker container inspectdocker container killdocker container logsdocker container lsdocker container pausedocker container portdocker container prunedocker container renamedocker container restartdocker container rmdocker container rundocker container startdocker container statsdocker container stopdocker container topdocker container unpausedocker container updatedocker container waitdocker cpdocker createdocker deploydocker diffdocker eventsdocker execdocker exportdocker historydocker imagedocker image builddocker image historydocker image importdocker image inspectdocker image loaddocker image lsdocker image prunedocker image pulldocker image pushdocker image rmdocker image savedocker image tagdocker imagesdocker importdocker infodocker inspectdocker killdocker loaddocker logindocker logoutdocker logsdocker networkdocker network connectdocker network createdocker network disconnectdocker network inspectdocker network lsdocker network prunedocker network rmdocker nodedocker node demotedocker node inspectdocker node lsdocker node promotedocker node psdocker node rmdocker node updatedocker pausedocker plugindocker plugin createdocker plugin disabledocker plugin enabledocker plugin inspectdocker plugin installdocker plugin lsdocker plugin pushdocker plugin rmdocker plugin setdocker plugin upgradedocker portdocker psdocker pulldocker pushdocker renamedocker restartdocker rmdocker rmidocker rundocker savedocker searchdocker secretdocker secret createdocker secret inspectdocker secret lsdocker secret rmdocker servicedocker service createdocker service inspectdocker service logsdocker service lsdocker service psdocker service rmdocker service scaledocker service updatedocker stackdocker stack deploydocker stack lsdocker stack psdocker stack rmdocker stack servicesdocker startdocker statsdocker stopdocker swarmdocker swarm cadocker swarm initdocker swarm joindocker swarm join-tokendocker swarm leavedocker swarm unlockdocker swarm unlock-keydocker swarm updatedocker systemdocker system dfdocker system eventsdocker system infodocker system prunedocker tagdocker topdocker unpausedocker updatedocker versiondocker volumedocker volume createdocker volume inspectdocker volume lsdocker volume prunedocker volume rmdocker waitUse the Docker command line (Engine)Engine: ExtendAccess authorization plugin (Engine)Docker log driver pluginsDocker network driver plugins (Engine)Extending Engine with pluginsManaged plugin system (Engine)Plugin configuration (Engine)Plugins API (Engine)Volume plugins (Engine)Engine: SecurityAppArmor security profiles for Docker (Engine)Automation with content trust (Engine)Content trust in Docker (Engine)Delegations for content trust (Engine)Deploying Notary (Engine)Docker security (Engine)Docker security non-events (Engine)Isolate containers with a user namespace (Engine)Manage keys for content trust (Engine)Play in a content trust sandbox (Engine)Protect the Docker daemon socket (Engine)Seccomp security profiles for Docker (Engine)Secure EngineUse trusted imagesUsing certificates for repository client verification (Engine)Engine: TutorialsEngine tutorialsNetwork containers (Engine)Get StartedPart 1: OrientationPart 2: ContainersPart 3: ServicesPart 4: SwarmsPart 5: StacksPart 6: Deploy your appMachineAmazon Web Services (Machine)Digital Ocean (Machine)docker-machine activedocker-machine configdocker-machine createdocker-machine envdocker-machine helpdocker-machine inspectdocker-machine ipdocker-machine killdocker-machine lsdocker-machine provisiondocker-machine regenerate-certsdocker-machine restartdocker-machine rmdocker-machine scpdocker-machine sshdocker-machine startdocker-machine statusdocker-machine stopdocker-machine upgradedocker-machine urlDriver options and operating system defaults (Machine)Drivers overview (Machine)Exoscale (Machine)Generic (Machine)Get started with a local VM (Machine)Google Compute Engine (Machine)IBM Softlayer (Machine)Install MachineMachineMachine CLI overviewMachine command-line completionMachine concepts and helpMachine overviewMicrosoft Azure (Machine)Microsoft Hyper-V (Machine)Migrate from Boot2Docker to MachineOpenStack (Machine)Oracle VirtualBox (Machine)Provision AWS EC2 instances (Machine)Provision Digital Ocean Droplets (Machine)Provision hosts in the cloud (Machine)Rackspace (Machine)VMware Fusion (Machine)VMware vCloud Air (Machine)VMware vSphere (Machine)NotaryClient configuration (Notary)Common Server and signer configurations (Notary)Getting started with NotaryNotary changelogNotary configuration filesRunning a Notary serviceServer configuration (Notary)Signer configuration (Notary)Understand the service architecture (Notary)Use the Notary client
文字

  • 1:概况介绍

  • 2:集装箱

  • 3:服务

  • 4:成群

  • 5:堆叠

  • 6:部署应用程序

先决条件

  • 安装Docker版本1.13或更高版本。

  • 按照第3部分的先决条件中所述获取Docker撰写。

  • 按照第4部分的先决条件中所述获取Docker机器。

  • 阅读第1部分中的方向。

  • 学习如何在第2部分中创建容器。

  • 确保您已经发布了friendlyhello你创造的形象将其推送到注册表我们将在这里使用共享的图像。

  • 确保你的图像作为一个部署的容器。运行此命令,在您的信息开槽usernamerepotagdocker run -p 80:80 username/repo:tag,然后访问http://localhost/

  • 有的最后版本docker-compose.yml来自第5部分手巧。导言在整个教程中,您一直在编辑相同的撰写文件。好吧,我们有好消息。组成文件在生产中和在您的机器上工作一样好。这里,我们将介绍一些运行您的Dockeralization应用程序的选项。选择一个选项

  • Docker CE(云提供商)

  • 企业(云提供商)

  • 企业(内部部署)

如果您对在生产中使用Docker CommunityEdition表示满意,可以使用DockerCloud帮助管理流行服务提供商(如AmazonWebServices、DigitalSea和MicrosoftAzure)上的应用程序。

设置和部署:

  • 将DockerCloud与您的首选提供者连接起来,授予DockerCloud权限,以便自动提供和“Dockerize”VM。

  • 使用DockerCloud创建计算资源并创建群集。

  • 部署您的应用程序。

::我们将在这里链接到DockerCloud文档;确保在完成每个步骤后返回到此页面。

连接码头云

您可以在标准模式或Swarm模式下运行Docker Cloud 。

如果您正在以标准模式运行DockerCloud,请按照下面的说明将您的服务提供商链接到DockerCloud。

  • AmazonWeb服务安装指南

  • 数字海洋设置指南

  • MicrosoftAzure安装指南

  • 分组设置指南

  • 软层安装指南

  • 使用DockerCloud代理将您自己的主机

如果您在Swarm模式下运行(建议用于Amazon Web Services或Microsoft Azure),请跳至下一节有关如何创建群集的部分。

创造你的蜂群

准备好创造一个群体了吗?

  • 如果您使用亚马逊网络服务(AWS),则可以在AWS上自动创建群集。

  • 如果您使用的是Microsoft Azure,则可以在Azure上自动创建一个群集。

  • 否则,创建节点在泊坞云UI,运行docker swarm initdocker swarm join命令,您在第4部分在了解到SSH通过泊坞云。最后,通过单击屏幕顶部的切换开启Swarm模式,并注册刚刚创建的swarm。注意:如果您使用Docker云代理自带主机,则此提供程序不支持群集模式。您可以使用Docker Cloud 注册您自己的现有群集。部署您的应用通过Docker Cloud连接到您的群集。在Docker for Mac或Docker for Windows(Edge版本)上,您可以直接通过桌面应用程序菜单连接到您的群集无论哪种方式,这将打开一个终端,其上下文是本地计算机,但其Docker命令会路由到您的云服务提供商上运行的群集。这与你一直遵循的范例有些不同,你通过SSH发送命令。现在,您可以直接访问本地文件系统和远程群集,从而实现一些非常整洁的命令:docker stack deploy -c docker-compose.yml getstartedlab就是这样!您的应用程序正在生产中运行,并由Docker Cloud进行管理。Docker Enterprise Edition的客户运行一个稳定的,商业支持的Docker Engine版本,作为附件,他们获得了我们的一流管理软件Docker Datacenter。您可以使用Universal Control Plane通过UI管理应用程序的各个方面,运行带有Docker Trusted Registry的私有映像注册表,浏览Docker Enterprise Edition坏消息是:拥有官方Docker Enterprise版本的唯一云提供商是Amazon Web Services和Microsoft Azure。好消息是:有一键模板可以快速在这些提供商中部署Docker Enterprise :

  • AWS码头企业

  • 船坞天青企业

注意:遇到这些问题?查看我们的AWS设置指南。您还可以查看Microsoft Azure的WIP指南。

一旦你完成设置并且Datacenter正在运行,你可以直接在UI中部署你的Compose文件。

二次

二次

在此之后,您将看到它正在运行,并且可以更改您选择的应用程序的任何方面,甚至编辑撰写文件本身。

二次

客户的码头企业版运行一个稳定的,商业支持版本的码头引擎,并作为一个附加-他们得到我们的一流管理软件,码头数据中心。您可以使用通用控制平面通过UI管理应用程序的各个方面,使用Docker可信注册表运行私有图像注册表,与LDAP提供程序集成,使用Docker ContentTrust签署生产图像,以及许多其他功能。

参观码头企业版

将您自己的服务器带到Docker Enterprise和设置Docker数据中心本质上包括两个步骤:

  1. 从Docker Store获取您的服务器操作系统的Docker企业版。

  1. 按照说明在您自己的主机上安装Datacenter。

注意:运行Windows容器?查看我们的Windows Server安装指南。

一旦你完成设置并且Datacenter正在运行,你可以直接在UI中部署你的Compose文件。

二次

二次

在此之后,您将看到它正在运行,并且可以更改您选择的应用程序的任何方面,甚至编辑撰写文件本身。

二次

祝贺%21

您已经对整个Docker平台进行了一次完整的堆栈式开发部署。

Docker平台的内容远远不止这里介绍的内容,但是您对容器、图像、服务、成群、堆栈、缩放、负载平衡、卷和位置约束的基本知识有很好的了解。

想再深入一点吗?以下是我们推荐的一些资源:

  • 样本我们的示例包括在容器中运行的流行软件的多个示例,以及一些传授最佳实践的好实验室。

  • 用户指南::用户指南中有几个示例,这些示例比本文所讨论的更深入地解释了网络和存储。

  • 行政指南介绍如何管理文档化生产环境。

  • 培训提供面对面教学和虚拟课堂环境的正式码头课程。

  • 博客::报道码头最近发生的事。

上一篇:下一篇: