Skip to content

Add environmental variables #15

@JanLauGe

Description

@JanLauGe

First of all, thank you for your work on this package!

I am trying to run docker containers that require environmental variables. In bash, the command would be something like docker run --env SOME_VARIABLE_1=some_value_1 --env SOME_VARIABLE_2=some_value_2 my_docker_image. However, I am strugling to make this work in harbor. I've tried the versions below to no avail. Is this supported? Where am I going wrong?

harbor::docker_run(
  image = 'my_docker_image',
  docker_opts = c(
    'SOME_VARIABLE_1' = 'some_value_1',
    'SOME_VARIABLE_2' = 'some_value_2')
  capture_text = TRUE)

harbor::docker_run(
  image = 'my_docker_image',
  docker_opts = '--env SOME_VARIABLE_1=some_value_1 --env SOME_VARIABLE_2=some_value_2)
  capture_text = TRUE)

Thanks a lot in advance for your help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions