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

Invalid template with docker 3.5.1 #486

Closed
abude opened this issue Jul 2, 2021 · 11 comments
Closed

Invalid template with docker 3.5.1 #486

abude opened this issue Jul 2, 2021 · 11 comments
Assignees

Comments

@abude
Copy link

abude commented Jul 2, 2021

Description
Running the command bin/start|status|stop gives an error on the docker-compose.dev file, an invalid template error.

docker version is 3.5.1

Steps To Reproduce

  1. run bin/start|stop|status

Expected Result
I expect the docker to run and work.

Actual Result
bin/start
Invalid template: "# Mark Shust's Docker Configuration for Magento\n# (https://github.com/markshust/docker-magento)\n#\n# Version 37.0.2\n\nversion: "3"\n\nservices:\n app:\n volumes: &appvolumes\n # Host mounts with performance penalty, only put what is necessary here\n - ./src/app/code:/var/www/html/app/code:cached\n - ./src/app/design:/var/www/html/app/design:cached\n - ./src/app/etc:/var/www/html/app/etc:cached\n - ./src/composer.json:/var/www/html/composer.json:cached\n - ./src/composer.lock:/var/www/html/composer.lock:cached\n - ./src/nginx.conf.sample:/var/www/html/nginx.conf:cached\n #- ./src/auth.json:/var/www/html/auth.json:cached\n #- ./src/m2-hotfixes:/var/www/html/m2-hotfixes:cached\n #- ./src/patches:/var/www/html/patches:cached\n #- ./src/var/log:/var/www/html/var/log:cached\n #- ./src/var/report:/var/www/html/var/report:cached\n # To sync your SSH to the container, uncomment the following line:\n #- ~/.ssh/id_rsa:/var/www/.ssh/id_rsa:cached\n # Linux only: remove the above lines (except nginx.conf line) and mount the entire src directory with:\n #- ./src:/var/www/html:cached\n\n phpfpm:\n volumes: *appvolumes\n # Linux only: host.docker.internal doesn't exist https://github.com/docker/for-linux/issues/264\n # Uncomment two lines below & replace IP with result of: docker run --rm alpine ip route | awk 'NR==1 {print $3}'\n #extra_hosts:\n # - "host.docker.internal:IP"\n\n mailhog:\n image: mailhog/mailhog\n ports:\n - "1025"\n - "8025:8025"\n\n # Disabling cron by default as it uses higher CPU, enable if needed\n #cron:\n # volumes: *appvolumes\n"

@Miguelnj
Copy link

Miguelnj commented Jul 2, 2021

Hey same problem here. I solved it by moving the app service content to the docker-compose.yml file and then removing the docker-compose.dev.yml reference from the bin/start and bin/stop scripts.
I din't care about the mail service since i don't use it.

Don't know about the cause but this seems to be a patch for the time being.

@walkwizus
Copy link

Hi,

Same problem here. thanks for you patch it works well.

@rangerz
Copy link
Contributor

rangerz commented Jul 7, 2021

The issue is not about Docker Desktop version 3.5.1. It's because your Mac is M1, not Intel

@abude
Copy link
Author

abude commented Jul 7, 2021

The issue is not about Docker Desktop version 3.5.1. It's because your Mac is M1, not Intel

Thanks for your reply however i'm on a macbook pro intel i9. not M1 mac.

@walkwizus
Copy link

I'm on M1 but this issue was present since the last update of Docker for Mac.

Maybe in relation: docker-archive/compose-cli#1896

@stefend
Copy link

stefend commented Jul 7, 2021

Maybe in relation: docker-archive/compose-cli#1896

Can confirm. I switched to 1.29.2 and no longer receive the error above.

@circlesix
Copy link

Can confirm. I upgraded this weekend to 3.5.2 and somewhere in the update it enabled the beta version of docker-compose (v2.0.0-beta.6). In docker desktop you can disable that under the "Experimental Features" section. Now i'm back to 1.29.2 (you can check your version with docker-compose --version) and everything is working correctly again.

@markshust
Copy link
Owner

Maybe in relation: docker/compose-cli#1896

Can confirm. I switched to 1.29.2 and no longer receive the error above.

Thanks for the info everyone. I'll try to get up to speed with issues in this repo.

Based on the comments it appears this is happening on Docker Compose 2, which isn't released yet. I purposely stay away from experimental features & beta versions to avoid issues like this (they've been huge time sucks for me in the past), but it is worth checking out soon. Seems to be caused by a comment-related format in the docker-compose YML files, but this issue could work itself out before Docker Compose 2 is officially released.

Let's keep this ticket open to keep an eye on it.

@markshust
Copy link
Owner

I just found out my Docker Desktop has been pegged at 3.3 for some time now, and updates have been failing.

I re-installed Docker Desktop completely, didn't change any settings, and it automatically pegged me to v2.0.0-beta.6. I'm not sure why they would put new installs automatically on a beta version... either this is bad release management by Docker, or they are planning to release it soon.

Either way, this changes things. I'm tapped out today, but will look at this first thing in the morning to try to find out what is going on.

@abude
Copy link
Author

abude commented Jul 20, 2021

@markshust just a quick update, the issue persists in v 3.5.2 docker.

@markshust
Copy link
Owner

All fixed, see diff above. All merged, the $ sign in the comment was causing this issue.

nakajo2011 added a commit to chaintope/workshop202107 that referenced this issue Aug 8, 2021
That error happens if `$` sign contains in comments in `docker-compose.yml`.
see also: markshust/docker-magento#486
nakajo2011 added a commit to chaintope/workshop202107 that referenced this issue Aug 8, 2021
That error happens if `$` sign contains in comments in `docker-compose.yml`.
see also: markshust/docker-magento#486
nakajo2011 added a commit to chaintope/workshop202107 that referenced this issue Aug 8, 2021
That error happens if `$` sign contains in comments in `docker-compose.yml`.
see also: markshust/docker-magento#486
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants