Last active
December 18, 2020 06:59
-
-
Save tatemz/fd745b4e48629255b4a158fa2c0667df to your computer and use it in GitHub Desktop.
A quick way to use one-off wp-cli commands with Docker. See Part 1: https://gist.github.com/tatemz/504383c921aa5898c49b82d4ee181362
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd wordpress-site | |
cat >> docker-compose.yml <<EOL | |
my-wpcli: | |
image: tatemz/wp-cli | |
volumes_from: | |
- my-wp | |
links: | |
- my-wpdb:mysql | |
entrypoint: wp | |
command: "--info" | |
EOL | |
docker-compose up -d | |
alias wp="docker-compose run --rm my-wpcli" | |
wp --info |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment