-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Variable name may not contain whitespace #6838
Comments
@alfredopalhares Could you please, provide the YAML file? |
i experienced this same issue, and after spending most of the afternoon, it looks like like maybe something changed with the way docker-compose processes current behavior on macosdocker version
Client: Docker Engine - Community
Version: 19.03.1
API version: 1.40
Go version: go1.12.5
Git commit: 74b1e89
Built: Thu Jul 25 21:18:17 2019
OS/Arch: darwin/amd64
Experimental: false With a cat .env
# POSTGRES
export POSTGRES_USER=foo
export POSTGRES_DB=secret and a version: '3'
services:
db:
image: postgres:latest
ports:
- "5432:5432"
volumes:
- ./data/postgresql:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${POSTRES_USER:-foo}
POSTGRES_DB: ${POSTGRES_DB:-foo}
[ ... ] run any docker-compose ps
ERROR: In file ./.env: environment variable name 'export POSTGRES_USER' may not contains whitespace. If I remove the Current behavior on Linux (ubuntu 19.0.4)Running the same commands as above, with the same setup as above, the same command works as expected. That said, the I should point out that I figured the above out in most part due to this blog post: |
Looks like this behavior changed with this commit: |
Anything in the With that said, it's often convenient to export variables here for other things. For instance, I'll export vars for injection into my shell via The commit indicated by @tjb-wiley breaks my workflow. I think |
Can't we just have docker-compose treat lines beginning as normal lines? So |
Looks like this is a known issue, going back to Feb of this year: |
This change fix the following error message by removing export from local-vsp-only.env. Please see the issue (docker/compose#6838). According to Docker documentation, there is no need to have export in the environment file (Source: https://docs.docker.com/compose/compose-file/#env_file#env_file). ERROR: In file /tmp/build/a94a8fe5/passport-verify-stub/local-vsp-only.env: environment variable name 'export SERVICE_ENTITY_IDS' may not contains whitespace. Author: @adityapahuja
This change fixes the following error message by removing export from local-vsp-only.env. Please see the issue (docker/compose#6838). According to Docker documentation, there is no need to have export in the environment file (Source: https://docs.docker.com/compose/compose-file/#env_file#env_file). ERROR: In file /tmp/build/a94a8fe5/passport-verify-stub/local-vsp-only.env: environment variable name 'export SERVICE_ENTITY_IDS' may not contains whitespace. Author: @adityapahuja
Description of the issue
Docker compose does not recnognize a valid yaml file, even when validated with a yamlint.org.
Context information (for bug reports)
Output of
docker-compose version
Output of
docker version
Output of
docker-compose config
(Make sure to add the relevant
-f
and other flags)Steps to reproduce the issue
Just tun any docker command
Observed result
Docker compose fails to run
Expected result
Should run
Additional information
OS Arch Linux Updated, but it happens accroos all OS.
The text was updated successfully, but these errors were encountered: