question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docker containers fail to start due to docker-compose.yml error

See original GitHub issue

Describe the bug Installed wp-local-docker v3.0.0 in WSL. When trying to create or start a project, it fails in starting the docker containers with the following error in docker-compose.yml:

Error : yaml.constructor.ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:js/undefined' in "./docker-compose.yml", line 48, column 20

Steps to Reproduce

  1. 10updocker create
  2. Go through setup
  3. Error is produced when starting containers

Expected behavior The expectation is that the site would be created or that the site would start

Screenshots

InkedScreenshot 2021-11-16 202058

Environment information

  • Device: PC Desktop
  • OS: Windows 11
  • Docker Desktop version: 4.1.1
  • Browser and version: N/A
  • WordPress version: N/A (not installed yet, but would be latest from WP git repo)
  • nvm: 1.1.7
  • npm: 8.1.3

Additional context This is a freshly installed version of wp-local-docker.

Also, thanks for making this! It’s appreciated. I’ve been using wp-local-docker since the initial version.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
tylercherpakcommented, Dec 20, 2021

Thanks @gsarig we are currently working on a more permanent solution. I will update when I have more info.

1reaction
dustinruecommented, Dec 8, 2021

In your site directory you will find a .containers/php-fpm file. Can you try replacing it with this?

ARG PHP_IMAGE=10up/wp-php-fpm-dev:8.0-ubuntu
FROM ${PHP_IMAGE}

ARG CALLING_USER=www-data
ARG CALLING_UID=33

LABEL "com.10up.wp-local-docker"="user-image"

USER root

RUN useradd ${CALLING_USER} -u ${CALLING_UID}
RUN mkdir -p /run/php-fpm
RUN chown ${CALLING_USER} /run/php-fpm
RUN chown ${CALLING_USER} /var/log/php*log
RUN touch /usr/local/etc/msmtprc && chown ${CALLING_USER} $_

USER ${CALLING_USER}

Then run docker-compose build and finally 10updocker start.

Read more comments on GitHub >

github_iconTop Results From Across the Web

docker-compose start "ERROR: No containers to start"
The issue here is that you haven't actually created the containers. You will have to create these containers before running them.
Read more >
How to Fix and Debug Docker Containers Like a Superhero
Container errors are tricky to diagnose, but some investigative magic works wonders. Read along to learn how to debug Docker containers.
Read more >
Solution build fails with docker compose error (in VS 15.3)
Developer Community. We have solution with docker enabled projects. It works if remove nginx service from docker-compose. yml and fails if return nginx...
Read more >
Troubleshooting Docker - Sitecore Documentation
Containers are stuck on Created status ... You usually see this error after you use docker-compose up . Certain services might fail to...
Read more >
Deployment Errors - Appsmith
In the file docker-compose.yml , change the ports for the Nginx container to a ... containers failed to start it may be due...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found