kitchen-dokken icon indicating copy to clipboard operation
kitchen-dokken copied to clipboard

feat: add support for running dokken in a container

Open ThatsMrTalbot opened this issue 3 years ago • 0 comments

Description

When kitchen-dokken is run inside docker itself with the socket mounted in it fails for a number of reasons:

  • Kitchen dokken will write files within $HOME/.dokken within the container, then attempt to bind bind that into the container being converged. Because bind mounts mount files/folders from the host this will cause failure.
  • If the docker instance is a docker-desktop instance (for example Docker for Mac) then the transport will resolve the incorrect address for the ssh connection

This change causes dokken to detect when it is run inside docker, and if it is it will aways use a data container. It will also connect to the data container using the internal "host.docker.internal" address if it detects the docker instance it is running is is a docker-desktop instance.

Issues Resolved

List any existing issues this PR resolves, or any Discourse or StackOverflow discussions that are relevant

Type of Change

Our release process assumes you are using Conventional Commit messages.

The most important prefixes you should have in mind are:

  • _fix_: which represents bug fixes, and correlates to a SemVer patch.
  • _feat_: which represents a new feature, and correlates to a SemVer minor.
  • _feat!_:, or fix!:, refactor!:, etc., which represent a breaking change (indicated by the !) and will result in a major version change.

If you have not included a conventional commit message this can be fixed on merge.

Check List

ThatsMrTalbot avatar Oct 12 '22 13:10 ThatsMrTalbot