diff --git a/README.adoc b/README.adoc index 59c7291..e563e79 100644 --- a/README.adoc +++ b/README.adoc @@ -9,7 +9,7 @@ = faas-bb image:{img-ci-tests-status}[link={url-ci-status-tests}] image:{img-ci-hadolint-status}[link={url-ci-status-hadolint}] image:{img-ci-clj-kondo-status}[link={url-ci-status-clj-kondo}] image:{img-license}[link=LICENSE] -An https://github.com/openfaas[OpenFaaS] template for writing Functions in https://babashka.org[Babashka]. +An https://github.com/openfaas[OpenFaaS] template for writing Functions in https://babashka.org[Babashka] (v1.3.186). == Why Babashka for OpenFaaS? diff --git a/template/bb/Dockerfile b/template/bb/Dockerfile index a7122a1..e8c7419 100644 --- a/template/bb/Dockerfile +++ b/template/bb/Dockerfile @@ -1,6 +1,6 @@ FROM ghcr.io/openfaas/of-watchdog:0.9.13 AS watchdog FROM babashka/babashka:1.3.186 AS babashka -FROM clojure:tools-deps-1.11.1.1347 AS build +FROM eclipse-temurin:8u392-b08-jdk AS build RUN set -e @@ -12,12 +12,7 @@ ENV PATH="$PATH:/usr/local/bin" COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog COPY --from=babashka /usr/local/bin/bb /usr/local/bin/bb -# /root/.m2 provides: clojure, core.specs.alpha, and spec.alpha -RUN addgroup --system app && adduser --system --ingroup app app && \ - mkdir -p $HOME/.deps.clj/1.11.1.1347/ClojureTools && \ - mv /root/.m2 $HOME && \ - chown app:app -R $HOME && \ - mv /usr/local/lib/clojure/libexec/clojure-tools-1.11.1.1347.jar $HOME/.deps.clj/1.11.1.1347/ClojureTools +RUN addgroup --system app && adduser --system --ingroup app app USER app WORKDIR $HOME @@ -26,6 +21,7 @@ COPY --chown=app:app index.clj bb.edn lib merge_config.clj ./ COPY --chown=app:app function/bb.edn* function/bb.edn RUN bb merge-config --src "function/bb.edn" --out "ship.edn" && \ + mkdir ~/.m2 && \ bb --config ship.edn prepare && \ bb --config ship.edn print-deps && \ cp -r .m2 .m2-ship