This commit is contained in:
Michiel Borkent 2020-02-09 22:55:12 +01:00
parent 794438b7c1
commit 148e3c9229
3 changed files with 48 additions and 20 deletions

View file

@ -227,16 +227,15 @@ jobs:
paths: paths:
- ~/.m2 - ~/.m2
key: v1-dependencies-{{ checksum "project.clj" }} key: v1-dependencies-{{ checksum "project.clj" }}
# docker: docker:
# docker: docker:
# - image: circleci/buildpack-deps:stretch - image: circleci/buildpack-deps:stretch
# steps: steps:
# - checkout - checkout
# - setup_remote_docker: - setup_remote_docker:
# docker_layer_caching: true - run:
# - run: name: Build Docker image
# name: Build Docker image command: .circleci/script/docker
# command: .circleci/script/docker
workflows: workflows:
version: 2 version: 2
@ -253,11 +252,11 @@ workflows:
- jvm - jvm
- linux - linux
- mac - mac
# - docker: - docker:
# filters: filters:
# branches: branches:
# only: master only: master
# requires: requires:
# - jvm - jvm
# - linux - linux
# - mac - mac

View file

@ -1,7 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
image_name="borkdude/clj-kondo" set -eo pipefail
image_tag=$(cat resources/CLJ_KONDO_VERSION)
image_name="borkdude/babashka"
image_tag=$(cat resources/BABASHKA_VERSION)
latest_tag="latest" latest_tag="latest"
if [[ $image_tag =~ SNAPSHOT$ ]]; then if [[ $image_tag =~ SNAPSHOT$ ]]; then

27
Dockerfile Normal file
View file

@ -0,0 +1,27 @@
FROM ubuntu AS BASE
RUN apt-get update
RUN apt-get install -yy curl unzip build-essential zlib1g-dev
WORKDIR "/opt"
RUN curl -sLO https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-19.3.1/graalvm-ce-java8-linux-amd64-19.3.1.tar.gz
RUN tar -xzf graalvm-ce-java8-linux-amd64-19.3.1.tar.gz
ENV GRAALVM_HOME="/opt/graalvm-ce-19.3.1"
ENV JAVA_HOME="/opt/graalvm-ce-19.3.1/bin"
ENV PATH="$PATH:$JAVA_HOME"
COPY . .
RUN apt install -y sudo
RUN ./.circleci/script/install-leiningen
RUN ./script/compile
RUN cp bb /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
RUN curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.29-r0/glibc-2.29-r0.apk
RUN apk add glibc-2.29-r0.apk
COPY --from=BASE /usr/local/bin/clj-kondo /usr/local/bin
ENV LD_LIBRARY_PATH /lib
CMD ["bb"]