From 284c55a2953bbc6d8a65b594621e84af8da36987 Mon Sep 17 00:00:00 2001 From: Hans Bugge Grathwohl Date: Wed, 14 Oct 2020 17:40:52 +0200 Subject: [PATCH] Dockerfile: Install curl to support babashka.curl (#614) With the current Ubuntu based docker image it is not possible to use babashka.curl: ``` > docker run --rm -it borkdude/babashka:0.2.3-SNAPSHOT bb '(-> "https://httpstat.us/200" babashka.curl/get :status)' ----- Error -------------------------------------------------------------------- Type: java.io.IOException Message: Cannot run program "curl": error=2, No such file or directory Location: :1:1 ----- Context ------------------------------------------------------------------ 1: (-> "https://httpstat.us/200" babashka.curl/get :status) ^--- Cannot run program "curl": error=2, No such file or directory ----- Stack trace -------------------------------------------------------------- babashka.curl/get - user - :1:1 ``` After this change it works: ``` > docker run --rm -it hansbugge/babashka bb '(-> "https://httpstat.us/200" babashka.curl/get :status)' 200 ``` --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2e813edf..f00ac459 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,7 @@ RUN ./script/uberjar RUN ./script/compile FROM ubuntu:latest -RUN mkdir -p /usr/local/bin +RUN apt-get update && apt-get install -y curl \ + && mkdir -p /usr/local/bin COPY --from=BASE /opt/bb /usr/local/bin/bb CMD ["bb"]