How do i run docker compose sample applications for getting started?
-
Link: https://docs.docker.com/samples
Link: https://docs.docker.com/compose/wordpressThe docker-compse.yaml has two types of versions, you should generally use version 2, but this example just shows version 1
Here's our docker-compose.yaml file in version 1 format.
wordpress: image: wordpress links: - db:mysql ports: - 8089:80 db: image: mariadb environment: MYSQL_ROOT_PASSWORD: example
To bring up the environment.
$ sudo docker-compose up
Going to the URL http://localhost:8089 will show the wordpress install page.
The version 2 format is on the link for the sample wordpress container install.
version 1 is legacy, for best practices try and stay with the latest version see link: https://docs.docker.com/compose/compose-file/compose-versioning/#versioning
© Lightnetics 2024