diff --git a/README.adoc b/README.adoc index 04a1bf1..3a1aa77 100644 --- a/README.adoc +++ b/README.adoc @@ -114,7 +114,10 @@ All tests run in CI with Github Actions. Some commands link:.github/workflows/fa === Unit tests -Run locally the unit tests for `bb` language: +Run locally the unit tests for OpenFaaS Function template `bb` language. + +The requirement is that babashka (`bb`) is https://github.com/babashka/babashka#installation[installed]. + [source, bash] ---- cd template/bb diff --git a/template/bb/Dockerfile b/template/bb/Dockerfile index eaf1dbb..c3eefa1 100644 --- a/template/bb/Dockerfile +++ b/template/bb/Dockerfile @@ -18,11 +18,12 @@ RUN addgroup --system app && adduser --system --ingroup app app && \ USER app WORKDIR $HOME -COPY index.clj function/bb.edn ./ -COPY lib ./ -COPY function function +COPY --chown=app:app index.clj function/bb.edn ./ +COPY --chown=app:app lib ./ +COPY --chown=app:app function function -RUN bb --deps-root function prepare && bb --deps-root function print-deps +RUN rm function/bb.edn && \ + bb --deps-root function prepare && bb --deps-root function print-deps ENV mode="http" ENV upstream_url="http://127.0.0.1:8082"