Installing Docker
Docker is an incredibly powerful tool for building and running containerized applications. A container is a pre-packaged and executable version of an application that can be started and stopped whenever needed.
As well as applications, this also includes technologies like MS SQL Server, Redis, RabbitMQ and much more. It allows a development machine to be kept clean, and for required services to only be executed as and when required.
To install Docker on a Windows machine:
- Download the docker installer from [
https://docs.docker.com/docker-for-windows/install/](https://docs.docker.com/docker-for-windows/install/) and follow the instructions on the docker site. `NOTE: At the time of writing, Docker desktop-only supports Windows 10 Professional. This will change once Windows Build 19018 or higher is publically available - Once installed and started, you will see Moby appear in your toolbar

- Open a command prompt, and type 'docker run -p 8080:80 nginx'. After a short download, a nginx web server will be running on the local machine. To validate that, navigate to http:[
//](https://docs.docker.com/docker-for-windows/install/)localhost:8080 in a web browser and you will see the below page
Docker Compose
When Docker is installed locally, a utility named docker-compose is also installed. It's useful to think of containers as the ingredients, and a compose file as a recipe that brings everything together.
Almost all of the WfD source code repositories contain a file named docker-compose.yml in their root folder. These files have been put together to allow any other developers to quickly start up all of the required local infrastructures to make changes to a specific code-base.
For example, the WfD Accounts Payable API only includes Microsoft SQL Server. Whereas a client codebase may include Microsoft SQL Server and also an instance of the Accounts Payable API.
To use a docker-compose file
- Open a command prompt, and navigate to the folder that contains the docker-compose file
- Run 'docker-compose up -d' (the -d on the end is important, as that starts the services detached from the current command line window)
- After a couple of seconds, any required services will be downloaded and started up
- When finished, run 'docker-compose down' in the same directory to shut down all of the relevant services