https://github.com/kitconcept/docker-stack-deploy/blob/main/scripts/docker-entrypoint.sh#L40 Error /docker-entrypoint.sh: line 40: export: `.env': not a valid identifier I don't understand why are you using printf, not cat