Hello world in a container

Hello world in a container So what’s this Docker thing all about? Docker allows you to run applications, worlds you create, inside containers. Running an application inside a container takes a single command: docker run. Note: Depending on your Docker system configuration, you may be required to preface each docker command on this page with sudo. To avoid this behavior, your system administrator can create a Unix group called docker and add users to it. Run a Hello world Let’s run a hello wor

Google Compute Engine

Google Compute Engine Create machines on Google Compute Engine. You will need a Google account and a project id. See https://cloud.google.com/compute/docs/projects for details on projects. Credentials The Google driver uses Application Default Credentials to get authorization credentials for use in calling Google APIs. So if docker-machine is used from a GCE host, authentication will happen automatically via the built-in service account. Otherwise, install gcloud and get through the oauth2 proc

Getting Started

Getting Started On this page you build a simple Python web application running on Docker Compose. The application uses the Flask framework and increments a value in Redis. While the sample uses Python, the concepts demonstrated here should be understandable even if you’re not familiar with it. Prerequisites Make sure you have already installed both Docker Engine and Docker Compose. You don’t need to install Python, it is provided by a Docker image. Step 1: Setup Create a directory for the proj

Google Cloud Logging driver

Google Cloud Logging driver The Google Cloud Logging driver sends container logs to Google Cloud Logging. Usage You can configure the default logging driver by passing the --log-driver option to the Docker daemon: docker daemon --log-driver=gcplogs You can set the logging driver for a specific container by using the --log-driver option to docker run: docker run --log-driver=gcplogs ... This log driver does not implement a reader so it is incompatible with docker logs. If Docker detects that i

Get started with multi-host networking

Get started with multi-host networking This article uses an example to explain the basics of creating a multi-host network. Docker Engine supports multi-host networking out-of-the-box through the overlay network driver. Unlike bridge networks, overlay networks require some pre-existing conditions before you can create one. These conditions are: Access to a key-value store. Docker supports Consul, Etcd, and ZooKeeper (Distributed store) key-value stores. A cluster of hosts with connectivity to t

Get started with a local VM

Get started with Docker Machine and a local VM Let’s take a look at using docker-machine for creating, using, and managing a Docker host inside of VirtualBox. Prerequisites Make sure you have the latest VirtualBox correctly installed on your system. If you used Toolbox for Mac or Windows to install Docker Machine, VirtualBox is automatically installed. If you used the Quickstart Terminal to launch your first machine and set your terminal environment to point to it, a default machine was automat

Generic

Generic Create machines using an existing VM/Host with SSH. This is useful if you are using a provider that Machine does not support directly or if you would like to import an existing host to allow Docker Machine to manage. The driver will perform a list of tasks on create: If docker is not running on the host, it will be installed automatically. It will update the host packages (apt-get update, yum update…). It will generate certificates to secure the docker daemon. The docker daemon will be

Frequently Asked Questions

Frequently asked questions If you don’t see your question here, feel free to drop by #docker-compose on freenode IRC and ask the community. Can I control service startup order? Yes - see Controlling startup order. Why do my services take 10 seconds to recreate or stop? Compose stop attempts to stop a container by sending a SIGTERM. It then waits for a default timeout of 10 seconds. After the timeout, a SIGKILL is sent to the container to forcefully kill it. If you are waiting for this timeout,

Format command and log output

Formatting reference Docker uses Go templates to allow users manipulate the output format of certain commands and log drivers. Each command a driver provides a detailed list of elements they support in their templates: Docker Images formatting Docker Inspect formatting Docker Log Tag formatting Docker Network Inspect formatting Docker PS formatting Docker Volume Inspect formatting Docker Version formatting Template functions Docker provides a set of basic functions to manipulate template elem

Fluentd logging driver

Fluentd logging driver The fluentd logging driver sends container logs to the Fluentd collector as structured log data. Then, users can use any of the various output plugins of Fluentd to write these logs to various destinations. In addition to the log message itself, the fluentd log driver sends the following metadata in the structured log message: Field Description container_id The full 64-character container ID. container_name The container name at the time it was started. If you use docker