Commit graph

769 commits

Author SHA1 Message Date
hmcgonig
0a75a724b6 provider/docker: Add support for a list of pull_triggers within the docker_image resource. (#10845) 2017-01-03 16:10:39 +00:00
hmcgonig
c5ccb7a65c provider/docker: Add support for a list of pull_triggers within the docker_image resource. (#10845) 2017-01-03 16:10:39 +00:00
VERDOÏA Laurent
8fcb881db3 provider/docker: Add network create --internal flag support (#10932)
* provider/docker: Add network create --internal flag support

* provider/docker: Add acceptance tests for network --internal flag
2017-01-03 11:46:16 +00:00
VERDOÏA Laurent
6ce5b9c292 provider/docker: Add network create --internal flag support (#10932)
* provider/docker: Add network create --internal flag support

* provider/docker: Add acceptance tests for network --internal flag
2017-01-03 11:46:16 +00:00
Michael Kuzmin
78397b5a9a provider/docker: fix regression, cert_path stop working (#10754) (#10801) 2016-12-17 12:41:08 +00:00
Michael Kuzmin
dd10418889 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
Michael Kuzmin
738e90507e 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
Michael Kuzmin
eb69b2ad34 provider/docker: authentication via values instead of files (#10151)
* Docker authentication via values

* Rename parameters to ca_material, cert_material, and key_material. Add environment variables.
2016-11-22 14:18:09 +02:00
Michael Kuzmin
bdd81081f6 provider/docker: authentication via values instead of files (#10151)
* Docker authentication via values

* Rename parameters to ca_material, cert_material, and key_material. Add environment variables.
2016-11-22 14:18:09 +02:00
Daniel Portella
81b81caeed provider/docker: Fixes for docker_container host object and documentation (#9367)
* Updated docker container documentation

Feedback from ticket #9350 indicated that documentation was out of date

renamed `hosts_entry` to `host`
added correct type information to *Extra Hosts* section.

Refs: 9350

* Fixes for docker_container host object

Feedback from ticket #9350 updated codebase so it reflects the requirements from docker in regards to `host` which is `Required` and not optional.
It now accurately reflects the docker requirements and the terraform documentation.

Test results

> Bear in mind the failure it is because my laptop doesnt support memory swap. So this test will always fail.

Changing the Schema from `optional` to `required` made no difference to the tests.

make testacc TEST=./builtin/providers/docker/
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/10/14 15:04:40 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/docker/ -v  -timeout 120m
=== RUN   TestAccDockerRegistryImage_basic
--- PASS: TestAccDockerRegistryImage_basic (4.57s)
=== RUN   TestAccDockerRegistryImage_private
--- PASS: TestAccDockerRegistryImage_private (6.22s)
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccDockerContainer_basic
--- PASS: TestAccDockerContainer_basic (7.16s)
=== RUN   TestAccDockerContainer_volume
--- PASS: TestAccDockerContainer_volume (7.37s)
=== RUN   TestAccDockerContainer_customized
--- FAIL: TestAccDockerContainer_customized (18.99s)
	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   TestAccDockerImage_basic
--- PASS: TestAccDockerImage_basic (2.58s)
=== RUN   TestAccDockerImage_private
--- PASS: TestAccDockerImage_private (2.70s)
=== RUN   TestAccDockerImage_destroy
--- PASS: TestAccDockerImage_destroy (30.00s)
=== RUN   TestAccDockerImage_data
--- PASS: TestAccDockerImage_data (5.93s)
=== RUN   TestAccDockerNetwork_basic
--- PASS: TestAccDockerNetwork_basic (0.24s)
=== RUN   TestAccDockerVolume_basic
--- PASS: TestAccDockerVolume_basic (0.05s)
FAIL
exit status 1
FAIL	github.com/hashicorp/terraform/builtin/providers/docker	85.816s
Makefile:47: recipe for target 'testacc' failed
make: *** [testacc] Error 1

Refs: 9350
2016-10-27 10:54:05 +01:00
Daniel Portella
1801efaf99 provider/docker: Fixes for docker_container host object and documentation (#9367)
* Updated docker container documentation

Feedback from ticket #9350 indicated that documentation was out of date

renamed `hosts_entry` to `host`
added correct type information to *Extra Hosts* section.

Refs: 9350

* Fixes for docker_container host object

Feedback from ticket #9350 updated codebase so it reflects the requirements from docker in regards to `host` which is `Required` and not optional.
It now accurately reflects the docker requirements and the terraform documentation.

Test results

> Bear in mind the failure it is because my laptop doesnt support memory swap. So this test will always fail.

Changing the Schema from `optional` to `required` made no difference to the tests.

make testacc TEST=./builtin/providers/docker/
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/10/14 15:04:40 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/docker/ -v  -timeout 120m
=== RUN   TestAccDockerRegistryImage_basic
--- PASS: TestAccDockerRegistryImage_basic (4.57s)
=== RUN   TestAccDockerRegistryImage_private
--- PASS: TestAccDockerRegistryImage_private (6.22s)
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccDockerContainer_basic
--- PASS: TestAccDockerContainer_basic (7.16s)
=== RUN   TestAccDockerContainer_volume
--- PASS: TestAccDockerContainer_volume (7.37s)
=== RUN   TestAccDockerContainer_customized
--- FAIL: TestAccDockerContainer_customized (18.99s)
	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   TestAccDockerImage_basic
--- PASS: TestAccDockerImage_basic (2.58s)
=== RUN   TestAccDockerImage_private
--- PASS: TestAccDockerImage_private (2.70s)
=== RUN   TestAccDockerImage_destroy
--- PASS: TestAccDockerImage_destroy (30.00s)
=== RUN   TestAccDockerImage_data
--- PASS: TestAccDockerImage_data (5.93s)
=== RUN   TestAccDockerNetwork_basic
--- PASS: TestAccDockerNetwork_basic (0.24s)
=== RUN   TestAccDockerVolume_basic
--- PASS: TestAccDockerVolume_basic (0.05s)
FAIL
exit status 1
FAIL	github.com/hashicorp/terraform/builtin/providers/docker	85.816s
Makefile:47: recipe for target 'testacc' failed
make: *** [testacc] Error 1

Refs: 9350
2016-10-27 10:54:05 +01:00
James Nugent
578ecf6ac7 provider/docker: Add alternative to cert_path
Add a note about using `eval $(docker-machine env)` when using Docker
Machine to avoid having to hard code a certificate path.
2016-09-21 09:32:24 +01:00
baboune
935d9540a0 Update index.html.markdown
Add note to reinforce the need for cert_path on any docker-machine based Docker environment.
2016-09-21 09:32:24 +01:00
baboune
980c114218 Update index.html.markdown
Use default docker server remote API port 2376 instead of 1234.
2016-09-17 17:57:37 +02:00
Radek Simko
efcc2e33ba docs: Fix misspelled words 2016-09-12 07:08:00 +01:00
kyhavlov
3f12dfcb35 docs: Fix exported attribute name in docker_registry_image 2016-08-19 20:35:00 -04:00
kyhavlov
54ab3a99fb docs: Fix example for docker_registry_image (#8308) 2016-08-19 07:40:50 +01:00
Paul Hinze
4700a9bbd9 website: Docs sweep for lists & maps 2016-07-28 15:49:53 -05:00
Radek Simko
5500263e08 docker/docs: Document new data source + limitations (#7814) 2016-07-26 17:07:35 +01:00
kyhavlov
46356f2d02 provider/docker: Added docker_registry_image data source (#7000) 2016-07-26 16:18:38 +01:00
JB Arsenault
3268ac3604 Add destroy_grace_seconds option to stop container before delete (#7513) 2016-07-11 16:03:02 +01:00
JB Arsenault
439a19426c Add destroy_grace_seconds option to stop container before delete (#7513) 2016-07-11 16:03:02 +01:00
Daniel Portella
44639f3ba5 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
6154fad933 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
efcec57608 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
ae92cc7e30 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
James Nugent
4ec88d82ab provider/docker: don't crash with empty commands
If any of the entries in `commands` on `docker_container` resources was
empty, the assertion to string panic'd. Since we can't use ValidateFunc
on list elements, we can only really check this at apply time. If any
value is nil (resolves to empty string during conversion), we fail with
an error prior to creating the container.

Fixes #6409.
2016-04-29 18:54:45 -05:00
Xavier Sellier
7059c33c30 Provider Docker: (#6376)
- Add option keep_locally
- Add unit test
- Add documentation
2016-04-27 17:18:02 +01:00
Xavier Sellier
c943ed4b78 Provider Docker: (#6376)
- Add option keep_locally
- Add unit test
- Add documentation
2016-04-27 17:18:02 +01:00
VERDOÏA Laurent
b4f8111aed provider/docker: #5298 Add support for docker run --user option 2016-04-04 21:43:59 -05:00
VERDOÏA Laurent
5cdb31fec1 provider/docker: #5298 Add support for docker run --user option 2016-04-04 21:43:59 -05:00
Rhyas
91cfbf9b4e Fix Image Destroy bug. #3609 #3771 2016-03-22 22:56:51 -06:00
Raphael Randschau
f7936ad8b3 Fix docker test assertions regarding latest tag 2016-03-06 16:45:06 +01:00
Verdoïa Laurent
021bbb2a18 provider/docker: #2417 Add support for restart policy unless-stopped 2016-02-26 12:38:31 +09:00
Verdoïa Laurent
193c75b164 provider/docker: #2417 Add support for restart policy unless-stopped 2016-02-26 12:38:31 +09:00
Colin Hebert
292c493762 Stop providing the hostConfig while starting the container 2016-02-13 22:04:51 +11:00
Paul Hinze
f5efe52f08 Merge pull request #5046 from tpounds/use-built-in-schema-string-hash
Use built-in schema.HashString instead of custom hash functions.
2016-02-12 07:58:34 -06:00
Sebastiaan van Steenis
eab6478caf Change default DOCKER_HOST value, fixes #4923 2016-02-10 20:21:17 +01:00
Trevor Pounds
5e0b6e3750 Use built-in schema.HashString. 2016-02-07 16:29:34 -08:00
Colin Hebert
f763cd8b35 remove extra parenthesis 2016-01-31 08:49:35 +11:00
Colin Hebert
edd907c043 Catch potential custom network errors in docker 2016-01-31 08:31:30 +11:00
Colin Hebert
dd61bc83cf provider/docker: Update documentation
- Use a consistent format
- Remove typos
- Specify the expected parameter type for each entry
- Change importance of block documentation
2016-01-31 08:23:35 +11:00
James Nugent
50d8d5773f 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
60f008ee4a 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
Colin Hebert
8bf14ffeb7 provider/docker: Add docker_volume resource 2016-01-15 17:34:53 +00:00
Colin Hebert
5f2147a9d5 provider/docker: Add docker_volume resource 2016-01-15 17:34:53 +00:00
James Nugent
75e1fee5fa 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
James Nugent
9806e6ea9a 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
James Nugent
ed0a250129 Merge branch 'docker-extra-hosts' of https://github.com/paulbellamy/terraform into paulbellamy-docker-extra-hosts 2016-01-14 15:48:51 +00:00
James Nugent
9a27537399 Merge branch 'docker-extra-hosts' of https://github.com/paulbellamy/terraform into paulbellamy-docker-extra-hosts 2016-01-14 15:48:51 +00:00