The devilbox Docker container are rebuild frequently and pushed to [dockerhub](https://hub.docker.com/r/cytopia/). However there might be cases in which you want to rebuild right away in order to use a new minor version of a tool inside the container.
#### 1.1 Why rebuild yourself?
Imagine for example you are using the [PHP 7.1](https://github.com/cytopia/docker-php-fpm-7.1) container which currently is available with the version 7.1.6. You found that PHP 7.1.7 has just been released, but the container wasn't yet updated to that version. If you can't wait and need that version now, you can just update the container to that version yourself.
#### 1.2 How to rebuild yourself?
Rebuilding yourself has been made pretty easy. The devilbox docker container repositories come with two scripts for automatic rebuilding. `build/docker-build.sh` and `build/docker-rebuild.sh`.
1.*Clone* or *fork and clone* the desired docker repository to your computer
2. Run `build/docker-build.sh` (cached build) or `build/docker-rebuild.sh` (uncached build)
Either of the two above scripts will rebuild the desired docker container with the latest available versions. The rebuild docker container will then be available locally by the tag `latest`
#### 1.3 How to use the rebuild container?
##### 1.3.1 Tagged devilbox repository
If your devilbox git repository is checked out on a `git tag`, then also the docker container are bound to specific docker tags. It will look like this in `docker-compose.yml`:
```yml
php:
image: cytopia/${PHP_SERVER:-php-fpm-7.0}:0.10
```
Your newly rebuild `latest` docker container will not yet be available for the next run. You still need to change the `docker-compose.yml` and set the container to `latest`:
```yml
php:
image: cytopia/${PHP_SERVER:-php-fpm-7.0}:latest
```
##### 1.3.2 devilbox repository on master branch
If your devilbox git repository is checkout out on the `master` branch, then all docker container are always bound to the `latest` docker tag inside `docker-compose.yml` and you do not need to change anything. Just rebuilding the container is enough to be picked up for the next start.