docker-magento icon indicating copy to clipboard operation
docker-magento copied to clipboard

onelinesetup still does not work on ubuntu

Open Serwach opened this issue 4 months ago • 3 comments

onelinesetup still does not work on ubuntu

Steps To Reproduce

  1. try curl -s https://raw.githubusercontent.com/markshust/docker-magento/master/lib/onelinesetup | bash -s -- magento.test community 2.4.8

or

curl -s https://raw.githubusercontent.com/markshust/docker-magento/release/next/lib/onelinesetup | bash -s -- magento.test community 2.4.8

Expected Result magento 2 will be installed

Actual Result for past few months it returns that opensearch container is not healthy

Serwach avatar Aug 19 '25 16:08 Serwach

There isn't any Ubuntu-specific logic or known compatibility handling for opensearch health checks in the onelinesetup script or Dockerfiles. The onelinesetup script just orchestrates the setup and doesn't directly check the health of the opensearch container itself. The Docker images used install plugins but don't define explicit health checks in their Dockerfiles—these are likely set in docker-compose or related configs. Issues with the opensearch container being unhealthy on Ubuntu are often related to Docker daemon configuration, system resources, or version mismatches, rather than anything in the docker-magento codebase itself. To troubleshoot, check the logs of the opensearch container (docker logs <container_name>) and inspect the health check output to see why it's failing. This can help pinpoint if it's a resource, networking, or compatibility issue on your system.
Reference: onelinesetup script
Reference: opensearch Dockerfile

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

dosubot[bot] avatar Aug 19 '25 16:08 dosubot[bot]

Please anybody help (but not you @dosu), its been like few months that I cannot install magento 2 on ubuntu, there are so many issues about it: https://github.com/markshust/docker-magento/issues/1333 https://github.com/markshust/docker-magento/pull/1341 but it still does not work

Serwach avatar Aug 19 '25 16:08 Serwach

The persistent "OpenSearch container is not healthy" error on Ubuntu is a known issue and not caused by recent changes in the docker-magento codebase. The main workaround is to manually increase the health check retries in compose.healthcheck.yaml—set x-healthcheck-defaults > retries to 30 instead of the default 6. Then use the manual setup steps: run the template script, update the healthcheck file, and proceed with bin/download and bin/setup (details here).

Alternatively, you can swap OpenSearch for Elasticsearch in your compose config (example config), which avoids the health check problem entirely.

Make sure your env directory contains all required files like magento.env and opensearch.env (see this), and if you’ve had failed installs, clean up with bin/removeall, delete your project directory, and start fresh.

If you still hit issues, check the OpenSearch container logs for clues. The problem is environmental (timing, resources, Docker setup), not a bug in the repo, and these workarounds remain current and effective.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

dosubot[bot] avatar Aug 19 '25 16:08 dosubot[bot]