Use arg and env?
Some checks failed
ci/woodpecker/push/tor Pipeline was successful
ci/woodpecker/push/rsync Pipeline was successful
ci/woodpecker/push/pagefind Pipeline failed

This commit is contained in:
Kaan Barmore-Genç 2023-10-26 17:08:02 -05:00
parent 66a76d8ef9
commit 9308cfa073
Signed by: kaan
GPG key ID: B2E280771CD62FCF

View file

@ -1,10 +1,12 @@
FROM alpine:latest FROM alpine:latest
ARG version=v1.0.3 ARG PAGEFIND_VERSION
ENV PAGEFIND_VERSION=${PAGEFIND_VERSION:-v1.0.3}
LABEL org.opencontainers.image.authors="kaan@bgenc.net" LABEL org.opencontainers.image.authors="kaan@bgenc.net"
RUN wget 'https://github.com/CloudCannon/pagefind/releases/download/${version}/pagefind-${version}-x86_64-unknown-linux-musl.tar.gz' \ RUN echo "Building ${PAGEFIND_VERSION}" \
&& tar -xvf pagefind-${version}-x86_64-unknown-linux-musl.tar.gz \ && wget 'https://github.com/CloudCannon/pagefind/releases/download/${PAGEFIND_VERSION}/pagefind-${PAGEFIND_VERSION}-x86_64-unknown-linux-musl.tar.gz' \
&& tar -xvf pagefind-${PAGEFIND_VERSION}-x86_64-unknown-linux-musl.tar.gz \
&& mv pagefind /usr/bin/ \ && mv pagefind /usr/bin/ \
&& rm pagefind-${version}-x86_64-unknown-linux-mus && rm pagefind-${PAGEFIND_VERSION}-x86_64-unknown-linux-musl.tar.gz