Starting an application instance

Before we write the first line of a testing code, we have to start an application with Docker. It's complex and you will learn how to make it in Chapter 15Packing Servers to Containers, but for now, open the code samples folder of that chapter and start a project from the Docker Compose script. However, you will also have to prepare an image for building microservices. Enter these two commands into a Terminal:

docker build -t rust:nightly nightly
docker-compose -f docker-compose.test.yml up

The project already contains a special Compose file, docker-compose.test.yml, that opens the ports of the containers to make it possible to connect to them from our local Rust application.

It takes time to start, but when the application has started, you will see the log in a Terminal window. Then, we can write some integration tests.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.241.250