Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

How to automate 10updocker create #302

Open
2 tasks done
jankocian opened this issue May 5, 2022 · 1 comment
Open
2 tasks done

How to automate 10updocker create #302

jankocian opened this issue May 5, 2022 · 1 comment
Labels
question Further information is requested

Comments

@jankocian
Copy link

Troubleshooting

  • I have attempted to troubleshoot this already

Describe your question

Hey all,
I'd like to automate my WP devstack install using a single shell script.

Unfortunately, I was not able to automate the 10updocker create command so far. The issue is with responding to the interactive prompts.

I tried using echo and printf, though I was not able to get past the PHP version question.

This gets me past the first two questions...

printf "sitename.test\n n" | 10updocker create

Any ideas on how to automate it all without installing extra packages?

Thanks a lot!

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jankocian jankocian added the question Further information is requested label May 5, 2022
@dustinrue
Copy link
Collaborator

There are a few options here.

  • Create a template for projects that already contains the necessary bits for wp-local-docker and maybe all you need to do is search/replace relevant files
  • Create an expect script to create the environment and answer each question - https://linux.die.net/man/1/expect
  • Dig into wp-local-docker code and create command line options for each question that can be passed on the cli. We would definitely consider a PR with that functionality

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants