Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.env-cmdrc return an error while working with Docker run command #356

Open
talor1981 opened this issue Jan 19, 2023 · 1 comment
Open

.env-cmdrc return an error while working with Docker run command #356

talor1981 opened this issue Jan 19, 2023 · 1 comment

Comments

@talor1981
Copy link

Hi, I try to connect the env values in my app that are existing under the .env-cmdrc file via the 'docker run' command:
'docker run --env-file ./.env-cmdrc -v ${pwd}\src:/app/src -d -p 3000:3000 --name react-app react-image'
And I got an Error:
'docker: poorly formatted environment: variable '"local": {' contains whitespaces.'
Has anyone encountered this issue?

@IgorOhrimenko
Copy link

.env-cmdrc is not valid ENV format.
You should run container like this:
docker run -v ${PWD}/.env-cmdrc:/app/.env-cmdrc:ro -v ${pwd}\src:/app/src -d -p 3000:3000 --name react-app react-image

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

No branches or pull requests

2 participants