Dan Čermák
435a32684f
Only return interfaces where addr is not nil
...
tunnel interfaces on Linux have addr set to nil which makes the function
list_interfaces fail with a backtrace.
2019-10-10 10:49:03 -07:00
Brian Cain
e6d47329ee
Add note about removing prefix workaround
2019-10-09 16:07:21 -07:00
Brian Cain
8458a21657
Determine prefix with netmask
2019-10-09 15:40:36 -07:00
Brian Cain
62b7e35169
Fixes #11094 : Determine prefix for docker public networks
...
Prior to this commit, the docker action was using the method `prefix` on
an IPv4 and IPv6 address. This works fine for ruby versions 2.5 and
newer, however the ruby shipped with Vagrant is before 2.5, and
therefore the IPv4 and IPv6 classes do not have the prefix method,
resulting in an error. This commit fixes that by using a different
method of determining the prefix.
2019-10-09 09:56:59 -07:00
Brian Cain
f1ea4eaac0
Ensure build_args are passed into docker compose config file
...
Prior to this commit, the docker compose build method would not properly
set build_args if given in a Vagrantfile. This commit fixes that by
using the passed in key `extra_args` from the docker build action.
2019-10-07 12:48:59 -07:00
Brian Cain
09af983caa
Fixes #11051 : Only use host vm if specified
...
Prior to this commit, the docker login action assumed that if there was
a password to authenticate with, Vagrant was using a host vm to run
docker. This is likely due to some legacy decisions with how Vagrant
used to manage running docker. This commit fixes that by only grabbing a
host_vm lock if the host_vm is actually in use, otherwise login
normally.
2019-09-05 14:54:40 -07:00
Brian Cain
4f80a9e6d5
Add test for requesting public ip range for docker network provider
2019-03-22 09:02:40 -07:00
Brian Cain
6bffdca972
Add beginning of connect network tests for docker provider
2019-03-21 16:06:24 -07:00
Brian Cain
82700d95b3
Ensure subnet is used if specified from user config options
2019-03-21 15:29:04 -07:00
Brian Cain
8c169714c5
Ensure variable names exist in method
2019-03-21 11:39:16 -07:00
Brian Cain
96a19aa00c
Fix how options to cli args are handled
...
Since options could also be defined as strings, convert it all to string
and compare those instead
2019-03-21 11:15:41 -07:00
Brian Cain
1027636e41
Split up and rename unit tests for docker network operations
2019-03-20 15:14:39 -07:00
Chris Roberts
623a1815ae
Allow use of subnet option when defining private network with dhcp type
2019-03-19 14:35:40 -07:00
Chris Roberts
670bef6596
Allow custom subnet to be provided when private network type is dhcp
2019-03-19 14:20:14 -07:00
Chris Roberts
afb6c20581
Fix option mask to be expected netmask
2019-03-19 14:03:03 -07:00
Chris Roberts
a1c7eec441
Include synchronization as the environment lock is per process only
2019-03-19 13:46:14 -07:00
Chris Roberts
a645ce3c25
Docker provider networking support updates
...
Use `mask` option for defining subnet on network configuration. Allow
options to be passed through using hash scoping and docker_network and
docker_connect prefixes. Enable public networks. Allow configuration
to define pre-existing networks by name.
2019-03-19 11:44:33 -07:00
Chris Roberts
c251e090b3
Remove Mutex for synchronization. Environment#lock satisfies requirement.
2019-03-19 11:44:02 -07:00
Brian Cain
6664936c0b
Make ignored vagrant network options a constant
2019-03-12 10:40:58 -07:00
Brian Cain
5ed5868067
Inspect networks before creating new ones
...
This commit updates the behavior of how the docker provider creates new
docker networks. It looks at each existing network to see if the
requested subnet has already been configured in the docker engine. If
so, Vagrant will use that network rather than creating a new one. This
includes networks not created by Vagrant. Vagrant will not clean up
these networks if created outside of Vagrant.
2019-03-12 10:36:57 -07:00
Brian Cain
cccbedf4ce
Update how docker network handles processing options to cli arguments
...
Add an "ignored option" array rather than a big if-statement expression
2019-03-04 14:19:40 -08:00
Brian Cain
953a380371
Fix how Vagrant assigns cli arguments for the create command
...
This commit inlines the flag assignments so that arguments are properly
assigned to flags rather than arguments to the subcommand.
2019-03-04 13:44:21 -08:00
Brian Cain
efb9fd7b65
Move strings into locales file
2019-03-04 13:33:08 -08:00
Brian Cain
a1b48ed1bb
Raise proper class if invalid options given for docker network
2019-03-04 13:17:14 -08:00
Brian Cain
0b28580105
Move out cli argument generation to own function
2019-03-04 10:33:24 -08:00
Brian Cain
81fa7036be
Rename cli argument method
2019-03-04 10:28:49 -08:00
Brian Cain
6c7c74be5a
Fix if statement from `=` to `==`
2019-03-04 10:28:05 -08:00
Brian Cain
5adffb608d
Only allow private_network for docker network provider
2019-03-01 16:34:43 -08:00
Brian Cain
29696b0f73
Allow for ipv6 networks in docker
2019-03-01 16:20:16 -08:00
Brian Cain
000457a012
Update how docker network provider creates networks
...
This commit updates the docker network provider to only create networks
by subnet rather than per-container.
2019-03-01 16:07:53 -08:00
Brian Cain
c20de9044d
Log information if unsupported docker network option is provided
2019-03-01 08:34:43 -08:00
Brian Cain
4a0f1a0a33
Update docker network action to auto-generate cli flags
...
This commit updates the docker network behavior to auto-generate the
docker network command flags from Vagrants network config option.
2019-03-01 08:34:43 -08:00
Brian Cain
b5a092397f
Add new function for handling vagrant options to docker network cli
...
flags
2019-03-01 08:34:43 -08:00
Brian Cain
4dc5f7c330
Add basic ability to configure some networks for containers
2019-03-01 08:34:43 -08:00
Brian Cain
e860c7709d
Begin to setup and configure docker networks for containers
2019-03-01 08:34:43 -08:00
Brian Cain
349cc5ddac
Add placeholder network destroy action for docker
2019-03-01 08:34:43 -08:00
Brian Cain
a336aa687c
Add logger and start to iterate over networks in config
2019-03-01 08:34:43 -08:00
Brian Cain
627251a307
Add basic docker network action
2019-03-01 08:34:43 -08:00
Brian Cain
4c61eaa933
Fixes #10643 : Ensure paths are properly expanded when comparing synced folders
...
Prior to this commit, the docker action would attempt to compare and
validate synced folders based on their string value, rather than their
actual path value. This commit updates that by path expanding the mounts
when comparing a containers synced folders.
2019-02-04 11:15:40 -08:00
Brian Cain
94bb50fa7e
Add test for syncing folders with docker provider
2018-10-17 14:14:27 -07:00
Martin Jonas
238338d803
Deterministic host VM synced folder location for Docker provider to prevent broken sync after host VM shutdown
...
Fix for #10282
2018-10-17 11:28:24 -07:00
Oleksiy Protas
166fe374b6
More explicit logging and 'dockerfile' option support
2018-09-19 10:25:37 -07:00
Oleksiy Protas
cbc69f5158
Build from git operation for docker
2018-09-19 10:24:09 -07:00
Josh Soref
1a5ddea9f4
Spelling fixes
...
* account
* addresses
* administrator
* afterwards
* because
* bridgeable
* capabilities
* capability
* checksum
* configuration
* configuration for
* configure
* criteria
* delimited
* delivered
* derivatives
* description
* detect
* directory
* display
* downloading
* during
* electric
* enabling
* encountered
* equivalent
* executable
* executed
* hashicorp
* hypervisor
* hyphens
* implementation
* incorporate
* inheritance
* initialize
* instance
* instead
* interactions
* invocable
* machine
* maximum
* message
* mounting
* overridden
* overwrite
* paramiko
* preparing
* provides
* provisioning
* recursively
* requested
* resetting
* retryable
* running
* satisfied
* searching
* sometimes
* specified
* successfully
* synced folders
* unauthorized
* underlying
* userprofile
* vagrant
* vagrantfile
* variable
* various
* version
* virtual
* windows
2018-03-14 14:41:04 +00:00
Chris Roberts
b333e5cd82
Fix argument construction when adding dockerfile path
...
Fixes #7914
2017-05-12 15:09:30 -07:00
Chris Roberts
6f578590a9
Skip forwarded port if disabled in docker provider
2017-03-09 10:28:41 -08:00
Seth Vargo
38f23fe001
providers/docker: Allow TCP and UDP ports on same number
...
This commit changes the way ports are aggregated in the Docker provider.
Previously ports were aggregated by their "number", but that is not a
truly unique representation. Instead, the protocol is now taken into
account when generating the port map.
Fixes GH-5527
2016-05-30 17:23:44 -04:00
Mitchell Hashimoto
bac5d039db
providers/docker: pull setting, default false [GH-5932]
2015-07-15 11:08:01 -07:00
Mitchell Hashimoto
be21604d45
providers/docker: style on custom Dockerfile
2015-07-08 16:07:57 -06:00
Mitchell Hashimoto
8d725c1f27
Merge pull request #5482 from duro/support-named-dockerfile
...
Support for Docker 1.5.0 named Dockerfile
2015-07-08 16:06:13 -06:00