nadrad / h-m-m

Hackers Mind Map
GNU General Public License v3.0
1.89k stars 53 forks source link

Dockerfile: Copy h-m-m to image as one of the final steps of the build #39

Closed d5ve closed 1 year ago

d5ve commented 2 years ago

Each edit to the h-m-m script was triggering a full image rebuild, including the slow apt-get and docker-php-ext-install steps.

I figure that the h-m-m script itself is more likely to change than the system installs.

Moving the COPY to after those operations means that each time h-m-m changes, the docker build can use the cache for the slow operations, and just add a new layer for the COPY at the end.

Plus chmod +x h-m-m is unnecessary as h-m-m already has the executable bit set.

nadrad commented 1 year ago

Thanks