Skip to content

Instantly share code, notes, and snippets.

@PiotrCzapla
Created September 22, 2021 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PiotrCzapla/7a67b505a5e57407e4c9a0499ead270c to your computer and use it in GitHub Desktop.
Save PiotrCzapla/7a67b505a5e57407e4c9a0499ead270c to your computer and use it in GitHub Desktop.
How to add a wp cli isolated ina a docker container
function wpcli(){
docker run -v $(pwd):/var/www/html --rm -it -u "$(stat -c'%u' .)" wordpress:cli "$@"
}
alias wp='wpcli wp'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment