Skip to content
This repository was archived by the owner on May 7, 2024. It is now read-only.

Conversation

fabiob
Copy link

@fabiob fabiob commented Mar 12, 2018

When running under docker-compose, the export -p command export a variable with an invalid name:

bash-4.3# export -p
declare -x DOCKERIZE_VERSION="0.4.0"
declare -x DOMAINS="..."
declare -x EMAIL="..."
declare -x HAPROXY_IMAGE="dockercloud/haproxy:1.6.6"
declare -x HOME="/root"
declare -x HOSTNAME="1d22be675798"
declare -x OLDPWD
declare -x PATH="/opt/letsencrypt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
declare -x PWD="/"
declare -x SHLVL="1"
declare -x TERM="xterm"
declare -x affinity:container

The presence of this variable prevents the cronjob from running:

bash-4.3# /etc/periodic/daily/certbot 
/opt/letsencrypt/etc/global.env: line 11: declare: `affinity:container': not a valid identifier

This patch ignores this variable when writing to the global.env file.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant