Skip to content

Make Docker-set environment variables accessible in cron jobs #188

Description

@lmakarov

Docker set environment variables (from Dockerfile ENV and docker-compose environment) are currently not visible in the environment of a cron job process.

We need to figure out a way to pass them correctly to cron jobs/etc. We could write to /etc/profile.d/docker-environment.sh, similar to how we handle secrets' conversion:

service-cli/7.3/startup.sh

Lines 107 to 108 in 113ca9f

# Write new variables to /etc/profile.d/secrets.sh to make them available for all users/sessions
echo "export ${key}=\"${secret_value}\"" | tee -a "/etc/profile.d/secrets.sh" >/dev/null

References:

Related issues: #128 , #187, docksal/docksal#1401

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions