Skip to content

Commit df7fd22

Browse files
committed
Added the watch tool.
1 parent 81f0415 commit df7fd22

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,38 @@ ARG DOCKER_IMAGE_VERSION=unknown
1313
# Define software versions.
1414
ARG OPENRESTY_VERSION=1.17.8.1
1515
ARG NGINX_PROXY_MANAGER_VERSION=2.6.1
16+
ARG WATCH_VERSION=0.3.1
1617

1718
# Define software download URLs.
1819
ARG OPENRESTY_URL=https://openresty.org/download/openresty-${OPENRESTY_VERSION}.tar.gz
1920
ARG NGINX_PROXY_MANAGER_URL=https://github.com/jc21/nginx-proxy-manager/archive/v${NGINX_PROXY_MANAGER_VERSION}.tar.gz
21+
ARG WATCH_URL=https://github.com/tj/watch/archive/${WATCH_VERSION}.tar.gz
2022

2123
# Define working directory.
2224
WORKDIR /tmp
2325

26+
# Build and install the watch binary.
27+
RUN \
28+
add-pkg --virtual build-dependencies \
29+
build-base \
30+
curl \
31+
&& \
32+
# Download.
33+
echo "Downloading watch..." && \
34+
mkdir watch && \
35+
curl -# -L ${WATCH_URL} | tar xz --strip 1 -C watch && \
36+
# Compile.
37+
echo "Compiling watch..." && \
38+
cd watch && \
39+
make && \
40+
# Install.
41+
echo "Installing watch..." && \
42+
make install && \
43+
strip /usr/local/bin/watch && \
44+
# Cleanup.
45+
del-pkg build-dependencies && \
46+
rm -rf /tmp/* /tmp/.[!.]*
47+
2448
# Build and install OpenResty (nginx).
2549
RUN \
2650
add-pkg --virtual build-dependencies \

0 commit comments

Comments
 (0)