# Task DOC-55 - Docker : optimise Dockerfile for faster rebuilds

Project: Docker
Status: closed
URL: https://community.openproject.org/work_packages/DOC-55

## Details

| Attribute | Value |
| --- | --- |
| Assignee | Cyril Rohr |
| Date |  |
| Priority | Medium |
| Target versions | Wish List |
| Category |  |
| Labels |  |

## Description

Currently, docker build cache isn't leveraged very well, so that assets are recompiled after each slight change (even if completely unrelated to the frontend, or purely about the docker configuration itself).

ENVs should also be declared only at the moment at which they are required, as they also invalidate cache (e.g. `SECRET_KEY_BASE` is probably only useful at runtime, but any change will trigger complete rebuild, including reinstallation of deps).

This makes iterations really painful.
