Skip to content

Add Support for Custom Docker Image Environment Variables #45

@Lavayuglimpse

Description

@Lavayuglimpse

Feature Request: Support for Custom Docker Image Environment Variables

Problem Statement

Currently, when using oswitch, users cannot easily set custom environment variables for the Docker containers they are utilizing. This limitation can hinder workflows that depend on specific configurations or secrets that need to be passed into the container environment.

Proposed Solution

It would be beneficial to allow users to specify environment variables when invoking oswitch. This can be done by adding an optional flag, such as -e or --env, followed by key-value pairs of the environment variables.

Steps to Implement

  1. Modify the oswitch command to accept an -e or --env flag.
  2. Parse the provided environment variables and pass them to the Docker run command.
  3. Update the documentation to include examples of how to use this feature.

Example Usage

bash
oswitch -e MY_VAR=value -e ANOTHER_VAR=another_value biolinux

Expected Outcome

Users will be able to set custom environment variables in the Docker container, enhancing the flexibility and usability of oswitch for bioinformatics analyses. This feature will make it easier to manage configurations and secrets within the containerized environments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions