Commit Graph

21 Commits

Author SHA1 Message Date
Januar cf8568fe55 provider/docker network alias (#14710)
* Add Network Alias configuration with network options

* Handle case where there's no network option

* Handle use case where network option is not available

* Handle use case where network option is not available

* Network alias only on user defined network

* Update documentation for docker provider on network aliases

* Remove unused variable

* Update documentation

* add unit test for docker container network

* fix unit test for docker container network
2017-05-22 09:20:32 -04:00
Malte Brodersen 994284f535 Allow Windows Docker containers to map volumes (#13584)
* fix regex for windows path

* Fix escaping

* move validate function out and create test
2017-05-15 13:09:50 +03:00
Daniel Portella 88cdae91e6 provider/docker: added support for linux capabilities (#12045)
* added support for linux capabilities

Refs #11623

Added capabilities block
Added tests for it
Added documentation for it.

My PC doesnt support memory swap so it errors there.

```
$ make testacc TEST=./builtin/providers/docker TESTARGS='-run=TestAccDockerContainer_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/17 14:57:08 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/docker -v -run=TestAccDockerContainer_ -timeout 120m
=== RUN   TestAccDockerContainer_basic
--- PASS: TestAccDockerContainer_basic (44.50s)
=== RUN   TestAccDockerContainer_volume
--- PASS: TestAccDockerContainer_volume (40.73s)
=== RUN   TestAccDockerContainer_customized
--- FAIL: TestAccDockerContainer_customized (50.27s)
	testing.go:265: Step 0 error: Check failed: Check 2/2 error: Container has wrong memory swap setting: -1
	Please check that you machine supports memory swap (you can do that by running 'docker info' command).
=== RUN   TestAccDockerContainer_upload
--- PASS: TestAccDockerContainer_upload (38.56s)
FAIL
exit status 1
FAIL	github.com/hashicorp/terraform/builtin/providers/docker	174.070s
Makefile:48: recipe for target 'testacc' failed
make: *** [testacc] Error 1
```

* Documentation changes.

* added maxitems and rerun tests
2017-03-07 18:48:20 +02:00
Michael Kuzmin 05145dba19 provider/docker: Upload files into container before first start (#9520)
* Create uploads section for docker containers

* Upload a single file, load its content from state
2016-12-05 11:06:34 +00:00
JB Arsenault fc838be69e Add `destroy_grace_seconds` option to stop container before delete (#7513) 2016-07-11 16:03:02 +01:00
Daniel Portella 21618a9111 provider/docker: Docker documentation and additional test message (#7412)
* added additional error info for when memory swap assert fails.

related to https://github.com/hashicorp/terraform/pull/7392

* updated docker_container documentation

reflect recent changes to docker provider around tests, dns options and
dns search support.

* Grammar and punctuation changes

Docker container documentation.

* Spell checking, grammar and punctuation.

Docker container documentation.

* Markdown change sto docker container documentation
2016-06-29 15:48:15 +01:00
Daniel Portella b8a84691ec provider/docker: Docker DNS Setting Enhancements (#7392)
* fixed go vet issues on aws provider in  master

* added support for dns, dns options and dns search for docker container.

On docker container resource you can specify dns_opts nad dns_search
which maps directly to docker --dns_opt and --dns_search parameters.
Allowing users to setup the embedded dns settings for their containers.

* fixed the asserts for the new features in tests.

fixed tests around DNS, DNS_OPTS and DNS_SEARCH
2016-06-29 13:38:46 +01:00
stack72 8ca3d94858 provider/docker: Fixing the Docker Container Mount Test
```
make testacc TEST=./builtin/providers/docker TESTARGS='-run=TestAccDockerContainer_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /vendor/)
TF_ACC=1 go test ./builtin/providers/docker -v
-run=TestAccDockerContainer_ -timeout 120m
=== RUN   TestAccDockerContainer_basic
--- PASS: TestAccDockerContainer_basic (17.25s)
=== RUN   TestAccDockerContainer_volume
--- PASS: TestAccDockerContainer_volume (16.79s)
=== RUN   TestAccDockerContainer_customized
--- PASS: TestAccDockerContainer_customized (19.65s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/docker 53.712s
```
2016-06-29 09:38:56 +01:00
VERDOÏA Laurent a24207b9b7 provider/docker: #5298 Add support for docker run --user option 2016-04-04 21:43:59 -05:00
James Nugent 4b7a98584a provider/docker: Mount named volumes in containers
This adds support for specifying named volumes for mounting in a
`docker_container` resource.
2016-01-15 21:59:33 +00:00
James Nugent 3380f08e5a provider/docker: Tweak and test `host_entry`
This adds acceptance tests for specifying extra hosts on Docker
containers. It also renames the repeating block from `hosts` to `host`,
which reads more naturally in the schema when multiple instances of the
block are declared.
2016-01-15 03:02:20 +00:00
Colin Hebert 32ce8fbcb4 Add network_mode support to docker 2016-01-01 09:57:21 +01:00
ryane 1f739d31da fix resource constraint specs 2015-11-04 15:52:16 -05:00
ryane 72c86a62c0 support for log driver + config in docker container 2015-11-04 15:52:16 -05:00
ryane 4531866d8d add label support to docker container resource 2015-11-04 15:52:15 -05:00
ryane 6842c32d03 add basic runtime constraints to docker_container 2015-11-04 15:52:15 -05:00
ryane 17d185808e restart policy support for docker_container 2015-11-04 15:52:15 -05:00
ryane 0ded14f160 entrypoint support for docker_container resource 2015-11-04 15:52:15 -05:00
Paul Hinze 4981d7d28c provider/docker: [tests] change images
use a base image with a long running process - fixes container tests
2015-06-29 16:09:05 -05:00
Mitchell Hashimoto a7a5d2e564 providers/docker: make container test better 2015-03-28 18:45:36 -07:00
Mitchell Hashimoto 7c253155c1 providers/docker: container acceptance tests 2015-03-27 15:33:17 -07:00