mirror of
https://github.com/nadrad/h-m-m.git
synced 2024-06-08 03:52:12 +02:00
d235452302
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.
14 lines
207 B
Docker
14 lines
207 B
Docker
FROM php:cli
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
libonig-dev xclip xsel wl-clipboard
|
|
|
|
RUN docker-php-ext-install mbstring
|
|
|
|
COPY ./h-m-m .
|
|
|
|
CMD ["./h-m-m"]
|