-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
48 additions
and
36 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
.. _Docker Compose: https://docs.docker.com/compose/ | ||
|
||
====================================== | ||
Create a simple Docker Compose project | ||
====================================== | ||
|
||
Go to Project 4 from the git repository root: | ||
|
||
.. code:: bash | ||
cd projects/p04 | ||
Build an image and start the container using `Docker Compose`_: | ||
|
||
.. code:: bash | ||
docker-compose up -d | ||
Check the container: | ||
|
||
.. code:: bash | ||
docker-compose ps | ||
# The name of the container: p04_php_1 | ||
Check the networks: | ||
|
||
.. code:: bash | ||
docker network ls | ||
# New bridge network: p04_default | ||
Delete the container, and networks with Docker Compose: | ||
|
||
.. code:: bash | ||
docker-compose down | ||
Or delete the volumes too. | ||
|
||
.. code:: bash | ||
docker-compose down --volume | ||
docker-compose down |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +0,0 @@ | ||
Build an image and start the container using [Docker Compose](https://docs.docker.com/compose/): | ||
|
||
```bash | ||
docker-compose up -d | ||
``` | ||
|
||
Check the container: | ||
|
||
```bash | ||
docker-compose ps | ||
# The name of the container: p04_php_1 | ||
``` | ||
|
||
Check the networks: | ||
|
||
```bash | ||
docker network ls | ||
# New bridge network: p04_default | ||
``` | ||
|
||
Delete the container, and networks with Docker Compose: | ||
|
||
```bash | ||
docker-compose down | ||
``` | ||
|
||
Or delete the volumes too. | ||
|
||
```bash | ||
docker-compose down --volume | ||
``` | ||
|
||
docker-compose down | ||
|
||
[Back to the main page](../../README.md) | ||