Closed abeardsley-vertex closed 4 years ago
This is strange for a number of reasons.
I'm also seeing near the bottom of your logs you're getting an error with one of your init scripts...
wordpress_1 | /usr/bin/env: 'bash\r': No such file or directory
That's extremely irregular. /usr/bin/env
is most certainly available in the image.
But anyway, to address your comments...
There is a database file that is restored as part of the first run (this is obvious I suppose), is the database restore happening after the url_replace maybe?
Nope, it's in the correct order. See below...
The only weird thing I can think of that I'm doing is attaching the entire wp-content folder, not just a single plugin or something
This shouldn't be a problem.
In the docker-compose output, there is this. Is it possible that the version numbers here are trying to tell me something or are the source of the problem?
Nope, this just updates the wordpress tables to the latest version compatible with your installed wordpress version. Numbers don't really matter and aren't important really to note.
Can you try again? Do a full docker-compose down -v
and clean up the example stuff from the compose file that you aren't using and lets go from there.
Confession time...I was editing the wrong docker-compose when trying to get url_replace to work.
However, in my troubleshooting I did find where the wordpress_1 | /usr/bin/env: 'bash\r': No such file or directory
error was coming from.
Commenting out - ./scripts:/docker-entrypoint-initwp.d
solved that one. I suppose it is because docker-entrypoint-initwp.d
does not exist? I had that in the docker-compose from the original git example.
Hopefully that helps and I have not completely wasted your time. Thank you for the prompt reply!
No worries. Glad to hear you got it sorted out!
Overview
I am migrating development from vvv to this. But when running
docker compose up
on a first run, theURL_REPLACE
function does not seem to work. Is it in the wrong place in mydocker-compose.yml
?If I log into the docker container itself I can run
wp search-replace
and it will work fine.There is a database file that is restored as part of the first run (this is obvious I suppose), is the database restore happening after the
url_replace
maybe?The only weird thing I can think of that I'm doing is attaching the entire wp-content folder, not just a single plugin or something.
In the docker-compose output, there is this. Is it possible that the version numbers here are trying to tell me something or are the source of the problem?
Win 10 x64
docker version
docker-compose.yml
Project structure
docker-compose up
output