Skip to content

Fixes #164 Enable a single environment variable to be passed#165

Closed
proffalken wants to merge 1 commit intotest-kitchen:masterfrom
proffalken:feature/kitchen-docker_164
Closed

Fixes #164 Enable a single environment variable to be passed#165
proffalken wants to merge 1 commit intotest-kitchen:masterfrom
proffalken:feature/kitchen-docker_164

Conversation

@proffalken
Copy link
Copy Markdown

OK, so this doesn't fix it really, however it does allow a single ENV variable to be set:

    driver_config:
      image: centos:7
      platform: centos
      provision: true
    # Don't use this as it installs EPEL6 on CentOS7
      require_ansible_repo: false
      install_epel_repo: true
      custom_env: container docker
    # Make sure that we swap out the fakesystemd for the real one
      provision_command:

results in

-----> Starting Kitchen (v1.4.2)
-----> Cleaning up any prior instances of <apache2-centos-71>
-----> Destroying <apache2-centos-71>...
       Finished destroying <apache2-centos-71> (0m0.00s).
-----> Testing <apache2-centos-71>
-----> Creating <apache2-centos-71>...
       Sending build context to Docker daemon 57.34 kB
       Sending build context to Docker daemon 
       Step 0 : FROM centos:7
        ---> 0f73ae75014f
       Step 1 : ENV container docker

My ruby is decidedly rusty so I've completely failed to be able to parse multiple custom_envs into a hash and then back into the Dockerfile, but I figure this is a good start and I'm willing to accept any suggestions about turning

- custom_env:
   - container: docker
   - role: apache

into

ENV container docker
ENV role apache

@coderanger
Copy link
Copy Markdown
Contributor

This is now supported via run_options and --env.

@coderanger coderanger closed this Jun 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants