Build the docker image with the `docker build` command from the root of the synapse repository.
```
docker build -t matrixdotorg/synapse .
docker build -t docker.io/matrixdotorg/synapse .
```
The `-t` option sets the image tag. Official images are tagged `matrixdotorg/synapse:<version>` where `<version>` is the same as the release tag in the synapse git repository.