bedrock-docker is a quick way create a Bedrock WordPress install meant for testing and continous integration. It is not a full replacement for development environments like Trellis.
bedrock-docker was developed for integration tests in Bud and Bedrock itself.
Run ./dev.sh
to clone bedrock
and sage
into ./bedrock
:
./dev.sh
Configure the WP_HOME
and WP_SITEURL
variables as needed in .env
.
Build and run the container in the background:
docker compose up --build -d
Get a bash session going:
docker compose run bedrock bash
This bash session has access to composer
, node
and the wordpress cli.
Setup dev environment as needed:
cd web/app/themes/sage
composer install
yarn install
yarn build
wp theme activate sage
- Copy
build
anddocker-compose.yml
into the root of an existing bedrock install. - Edit
services.bedrock.volumes
indocker-compose.yml
to reference the correct path../bedrock:/srv/bedrock
becomes./:/srv/bedrock
.
Keep track of development and community news.
- Join us on Roots Slack by becoming a GitHub sponsor
- Participate on the Roots Discourse
- Follow @rootswp on Twitter
- Read and subscribe to the Roots Blog
- Subscribe to the Roots Newsletter