By having this hardcoded list of log drivers, it is a bottleneck
to us supporting more log drivers.
The daemon already validates if a log driver is valid or not, so rather
than duplicating that validation, let's pass the log_driver along.
This allows support for new/more log drivers as they become supported
in docker without having to wait for both docker-py and docker-compose
to support them.
Keeping the current list of log driver types for backwards compatibility.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
By using `json-file` as the use case we can run this without needing
to be on a machine with syslog installed.
Even if syslog was installed, this test was still failing as the
`log_opt` of 'key1' is an invalid option.
This test is slightly different style to the others, it hopefully
includes an example of how to space out tests for increased readability,
we construct our tests in 3 phases(generally) and include a space imbetween
them:
- setup
- perform action
- assertions
Expanded variable names is important for readability/clarity. Also
reduced the number of assertions to focus on the logic we're testing.
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
In testing Docker master with the latest docker-py release, a few new
tests exist which don't set the base_url, which is not the default unix
socket location when Docker's integration tests are running.
Also, there is no guarantee syslog can be reached from a test container
so I wrapped that test with the NOT_ON_HOST skip logic.
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Fixes#498
Allowing `Dockerfile` and `.dockerignore` in the exclusion filter
completely breaks the build on docker < 1.5
In Docker 1.5 these entries are treated as special cases when included
in the .dockerignore and are still sent as part of the context. The
daemon ends up excluding them from any `ADD`, `COPY`, and cache
validation.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
The new docker api allows specifing mac address for containers. This change is to allow docker py the same functionality.
Signed-off-by: James Harris <james@rancher.com>
Currently TestImportFromStream fails, because something is going wrong
with the HTTP chunked transfer-encoding. This didn't work before,
either (for a different reason).