Skip to content

Commit

Permalink
[clj-kondo#410] fix docker build issue (clj-kondo#411)
Browse files Browse the repository at this point in the history
- Fixes leiningen install
- Removes tools.deps from Docker builds
- Fails fast on shell errors
  • Loading branch information
lispyclouds authored and borkdude committed Aug 8, 2019
1 parent e859104 commit 32bb262
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .circleci/script/docker
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

set -eo pipefail

image_name="borkdude/clj-kondo"
image_tag=$(cat resources/CLJ_KONDO_VERSION)
latest_tag="latest"
Expand Down
18 changes: 8 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ubuntu AS BASE

RUN apt-get update
RUN apt-get install -yy curl unzip build-essential zlib1g-dev
WORKDIR "/opt"
Expand All @@ -7,18 +8,15 @@ RUN tar -xzf graalvm-ce-linux-amd64-19.1.1.tar.gz
ENV GRAALVM_HOME="/opt/graalvm-ce-19.1.1"
ENV JAVA_HOME="/opt/graalvm-ce-19.1.1/bin"
ENV PATH="$PATH:$JAVA_HOME"
RUN curl -sLO https://download.clojure.org/install/linux-install-1.10.0.442.sh
RUN chmod +x linux-install-1.10.0.442.sh
RUN ./linux-install-1.10.0.442.sh
COPY deps.edn .
COPY src src
COPY resources resources
COPY reflection.json .
RUN clojure -Spath
COPY script/compile .
RUN ./compile
COPY . .
RUN apt install -y sudo
RUN ./.circleci/script/install-leiningen
RUN ./script/compile
RUN cp clj-kondo /usr/local/bin


FROM alpine:3.9

# See https://github.com/sgerrand/alpine-pkg-glibc
RUN apk --no-cache add ca-certificates curl
RUN curl -o /etc/apk/keys/sgerrand.rsa.pub -sL https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
Expand Down

0 comments on commit 32bb262

Please sign in to comment.