babashka/Dockerfile

68 lines
2.5 KiB
Docker
Raw Normal View History

Use Debian bullseye on CI/CD/Dockerfile (#1005) * Migrate `Dockerfile` to use a bullseye-based image Also, some QoL changes on the `Dockerfile`: - Parametrize GRAALVM_VERSION to make it easier to update - Remove installing programs already included on base image - Remove `deps.edn` from `.dockerignore` since it is necessary to build * Migrate CircleCI to use a bullseye-based image Also some modifications necessary to make it work: - Migrate from `circleci` images to `clojure` since they're out-of-date and also seem to be considered legacy: https://circleci.com/docs/2.0/circleci-images/#legacy-language-images - Remove unnecessary usage of `sudo`, since all commands runs as root - Sync packages with `Dockerfile`. This will make easier to test locally if everything will work (of course, it is not 100% guarantee) * Remove lsof * Remove "Install {Clojure,Leiningen}" steps Already included on the base image. * Do not change directory when downloading GraalVM * Move "Download GraalVM" to script/download-graalvm * Set GRAALVM_HOME correctly * Unbreak mac build * Revert "Set GRAALVM_HOME correctly" This reverts commit 5e2a6158dc28958bda7c2bd58c5597ebe02d6aef. * Set GRAALVM_HOME correctly, take 2 * Improve download-graalvm script * Re-added "Install Clojure" steps * Set amd64 as default GRAALVM_ARCH * Unbreak linux-aarch64 * Ubreak jvm * Do not change directory * Fix yaml * Fix mac/linux-aarch64 * Add missing Clojure * Fix cache * Move GraalVM installation to /tmp * Use script/install-clojure * Use /opt instead of /tmp to install GraalVM * Revert "Use /opt instead of /tmp to install GraalVM" This reverts commit 3cfad03c8ed641bb915ea19953423c43e801eafc. * Use CircleCI's Clojure images again * Go back to installing GraalVM on $HOME
2021-09-13 21:28:13 +00:00
FROM clojure:openjdk-11-lein-2.9.6-bullseye AS BASE
2020-02-09 21:55:12 +00:00
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update
Use Debian bullseye on CI/CD/Dockerfile (#1005) * Migrate `Dockerfile` to use a bullseye-based image Also, some QoL changes on the `Dockerfile`: - Parametrize GRAALVM_VERSION to make it easier to update - Remove installing programs already included on base image - Remove `deps.edn` from `.dockerignore` since it is necessary to build * Migrate CircleCI to use a bullseye-based image Also some modifications necessary to make it work: - Migrate from `circleci` images to `clojure` since they're out-of-date and also seem to be considered legacy: https://circleci.com/docs/2.0/circleci-images/#legacy-language-images - Remove unnecessary usage of `sudo`, since all commands runs as root - Sync packages with `Dockerfile`. This will make easier to test locally if everything will work (of course, it is not 100% guarantee) * Remove lsof * Remove "Install {Clojure,Leiningen}" steps Already included on the base image. * Do not change directory when downloading GraalVM * Move "Download GraalVM" to script/download-graalvm * Set GRAALVM_HOME correctly * Unbreak mac build * Revert "Set GRAALVM_HOME correctly" This reverts commit 5e2a6158dc28958bda7c2bd58c5597ebe02d6aef. * Set GRAALVM_HOME correctly, take 2 * Improve download-graalvm script * Re-added "Install Clojure" steps * Set amd64 as default GRAALVM_ARCH * Unbreak linux-aarch64 * Ubreak jvm * Do not change directory * Fix yaml * Fix mac/linux-aarch64 * Add missing Clojure * Fix cache * Move GraalVM installation to /tmp * Use script/install-clojure * Use /opt instead of /tmp to install GraalVM * Revert "Use /opt instead of /tmp to install GraalVM" This reverts commit 3cfad03c8ed641bb915ea19953423c43e801eafc. * Use CircleCI's Clojure images again * Go back to installing GraalVM on $HOME
2021-09-13 21:28:13 +00:00
RUN apt install --no-install-recommends -yy build-essential zlib1g-dev
2020-02-09 21:55:12 +00:00
WORKDIR "/opt"
Use Debian bullseye on CI/CD/Dockerfile (#1005) * Migrate `Dockerfile` to use a bullseye-based image Also, some QoL changes on the `Dockerfile`: - Parametrize GRAALVM_VERSION to make it easier to update - Remove installing programs already included on base image - Remove `deps.edn` from `.dockerignore` since it is necessary to build * Migrate CircleCI to use a bullseye-based image Also some modifications necessary to make it work: - Migrate from `circleci` images to `clojure` since they're out-of-date and also seem to be considered legacy: https://circleci.com/docs/2.0/circleci-images/#legacy-language-images - Remove unnecessary usage of `sudo`, since all commands runs as root - Sync packages with `Dockerfile`. This will make easier to test locally if everything will work (of course, it is not 100% guarantee) * Remove lsof * Remove "Install {Clojure,Leiningen}" steps Already included on the base image. * Do not change directory when downloading GraalVM * Move "Download GraalVM" to script/download-graalvm * Set GRAALVM_HOME correctly * Unbreak mac build * Revert "Set GRAALVM_HOME correctly" This reverts commit 5e2a6158dc28958bda7c2bd58c5597ebe02d6aef. * Set GRAALVM_HOME correctly, take 2 * Improve download-graalvm script * Re-added "Install Clojure" steps * Set amd64 as default GRAALVM_ARCH * Unbreak linux-aarch64 * Ubreak jvm * Do not change directory * Fix yaml * Fix mac/linux-aarch64 * Add missing Clojure * Fix cache * Move GraalVM installation to /tmp * Use script/install-clojure * Use /opt instead of /tmp to install GraalVM * Revert "Use /opt instead of /tmp to install GraalVM" This reverts commit 3cfad03c8ed641bb915ea19953423c43e801eafc. * Use CircleCI's Clojure images again * Go back to installing GraalVM on $HOME
2021-09-13 21:28:13 +00:00
2021-11-04 10:01:41 +00:00
ENV GRAALVM_VERSION="21.3.0"
Use Debian bullseye on CI/CD/Dockerfile (#1005) * Migrate `Dockerfile` to use a bullseye-based image Also, some QoL changes on the `Dockerfile`: - Parametrize GRAALVM_VERSION to make it easier to update - Remove installing programs already included on base image - Remove `deps.edn` from `.dockerignore` since it is necessary to build * Migrate CircleCI to use a bullseye-based image Also some modifications necessary to make it work: - Migrate from `circleci` images to `clojure` since they're out-of-date and also seem to be considered legacy: https://circleci.com/docs/2.0/circleci-images/#legacy-language-images - Remove unnecessary usage of `sudo`, since all commands runs as root - Sync packages with `Dockerfile`. This will make easier to test locally if everything will work (of course, it is not 100% guarantee) * Remove lsof * Remove "Install {Clojure,Leiningen}" steps Already included on the base image. * Do not change directory when downloading GraalVM * Move "Download GraalVM" to script/download-graalvm * Set GRAALVM_HOME correctly * Unbreak mac build * Revert "Set GRAALVM_HOME correctly" This reverts commit 5e2a6158dc28958bda7c2bd58c5597ebe02d6aef. * Set GRAALVM_HOME correctly, take 2 * Improve download-graalvm script * Re-added "Install Clojure" steps * Set amd64 as default GRAALVM_ARCH * Unbreak linux-aarch64 * Ubreak jvm * Do not change directory * Fix yaml * Fix mac/linux-aarch64 * Add missing Clojure * Fix cache * Move GraalVM installation to /tmp * Use script/install-clojure * Use /opt instead of /tmp to install GraalVM * Revert "Use /opt instead of /tmp to install GraalVM" This reverts commit 3cfad03c8ed641bb915ea19953423c43e801eafc. * Use CircleCI's Clojure images again * Go back to installing GraalVM on $HOME
2021-09-13 21:28:13 +00:00
RUN curl -sLO https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${GRAALVM_VERSION}/graalvm-ce-java11-linux-amd64-${GRAALVM_VERSION}.tar.gz
RUN tar -xzf graalvm-ce-java11-linux-amd64-${GRAALVM_VERSION}.tar.gz
2020-04-05 21:51:26 +00:00
ARG BABASHKA_XMX="-J-Xmx4500m"
Use Debian bullseye on CI/CD/Dockerfile (#1005) * Migrate `Dockerfile` to use a bullseye-based image Also, some QoL changes on the `Dockerfile`: - Parametrize GRAALVM_VERSION to make it easier to update - Remove installing programs already included on base image - Remove `deps.edn` from `.dockerignore` since it is necessary to build * Migrate CircleCI to use a bullseye-based image Also some modifications necessary to make it work: - Migrate from `circleci` images to `clojure` since they're out-of-date and also seem to be considered legacy: https://circleci.com/docs/2.0/circleci-images/#legacy-language-images - Remove unnecessary usage of `sudo`, since all commands runs as root - Sync packages with `Dockerfile`. This will make easier to test locally if everything will work (of course, it is not 100% guarantee) * Remove lsof * Remove "Install {Clojure,Leiningen}" steps Already included on the base image. * Do not change directory when downloading GraalVM * Move "Download GraalVM" to script/download-graalvm * Set GRAALVM_HOME correctly * Unbreak mac build * Revert "Set GRAALVM_HOME correctly" This reverts commit 5e2a6158dc28958bda7c2bd58c5597ebe02d6aef. * Set GRAALVM_HOME correctly, take 2 * Improve download-graalvm script * Re-added "Install Clojure" steps * Set amd64 as default GRAALVM_ARCH * Unbreak linux-aarch64 * Ubreak jvm * Do not change directory * Fix yaml * Fix mac/linux-aarch64 * Add missing Clojure * Fix cache * Move GraalVM installation to /tmp * Use script/install-clojure * Use /opt instead of /tmp to install GraalVM * Revert "Use /opt instead of /tmp to install GraalVM" This reverts commit 3cfad03c8ed641bb915ea19953423c43e801eafc. * Use CircleCI's Clojure images again * Go back to installing GraalVM on $HOME
2021-09-13 21:28:13 +00:00
ENV GRAALVM_HOME="/opt/graalvm-ce-java11-${GRAALVM_VERSION}"
ENV JAVA_HOME="/opt/graalvm-ce-java11-${GRAALVM_VERSION}/bin"
2020-05-23 13:44:17 +00:00
ENV PATH="$JAVA_HOME:$PATH"
2020-04-05 21:51:26 +00:00
ENV BABASHKA_XMX=$BABASHKA_XMX
# Make it possible to use Docker to build bb with a particular set of features
# by setting them at build time via `docker build --build-arg ARG_NAME=true ...`
ARG BABASHKA_LEAN=
ARG BABASHKA_MUSL=
ARG BABASHKA_FEATURE_CSV=
ARG BABASHKA_FEATURE_JAVA_NET_HTTP=
ARG BABASHKA_FEATURE_JAVA_NIO=
ARG BABASHKA_FEATURE_JAVA_TIME=
ARG BABAHSKA_FEATURE_TRANSIT=
ARG BABASHKA_FEATURE_XML=
ARG BABASHKA_FEATURE_YAML=
ARG BABASHKA_FEATURE_HTTPKIT_CLIENT=
ARG BABASHKA_FEATURE_HTTPKIT_SERVER=
ARG BABASHKA_FEATURE_JDBC=
ARG BABASHKA_FEATURE_POSTGRESQL=
ARG BABASHKA_FEATURE_HSQLDB=
ARG BABASHKA_FEATURE_ORACLEDB=
ARG BABASHKA_FEATURE_DATASCRIPT=
ARG BABASHKA_FEATURE_LANTERNA=
ARG BABASHKA_STATIC=
ENV BABASHKA_LEAN=$BABASHKA_LEAN
ENV BABASHKA_FEATURE_CSV=$BABASHKA_FEATURE_CSV
ENV BABASHKA_FEATURE_JAVA_NET_HTTP=$BABASHKA_FEATURE_JAVA_NET_HTTP
ENV BABASHKA_FEATURE_JAVA_NIO=$BABASHKA_FEATURE_JAVA_NIO
ENV BABASHKA_FEATURE_JAVA_TIME=$BABASHKA_FEATURE_JAVA_TIME
ENV BABAHSKA_FEATURE_TRANSIT=$BABAHSKA_FEATURE_TRANSIT
ENV BABASHKA_FEATURE_XML=$BABASHKA_FEATURE_XML
ENV BABASHKA_FEATURE_YAML=$BABASHKA_FEATURE_YAML
ENV BABASHKA_FEATURE_HTTPKIT_CLIENT=$BABASHKA_FEATURE_HTTPKIT_CLIENT
ENV BABASHKA_FEATURE_HTTPKIT_SERVER=$BABASHKA_FEATURE_HTTPKIT_SERVER
ENV BABASHKA_FEATURE_JDBC=$BABASHKA_FEATURE_JDBC
ENV BABASHKA_FEATURE_POSTGRESQL=$BABASHKA_FEATURE_POSTGRESQL
ENV BABASHKA_FEATURE_HSQLDB=$BABASHKA_FEATURE_HSQLDB
ENV BABASHKA_FEATURE_ORACLEDB=$BABASHKA_FEATURE_ORACLEDB
ENV BABASHKA_FEATURE_DATASCRIPT=$BABASHKA_FEATURE_DATASCRIPT
ENV BABASHKA_FEATURE_LANTERNA=$BABASHKA_FEATURE_LANTERNA
ENV BABASHKA_STATIC=$BABASHKA_STATIC
ENV BABASHKA_MUSL=$BABASHKA_MUSL
2020-02-09 21:55:12 +00:00
COPY . .
2020-04-28 10:12:56 +00:00
RUN ./script/uberjar
2021-05-10 21:03:39 +00:00
RUN ./script/setup-musl
2021-05-10 21:25:01 +00:00
RUN ./script/compile
2020-02-09 21:55:12 +00:00
2020-10-01 18:06:49 +00:00
FROM ubuntu:latest
RUN apt-get update && apt-get install -y curl \
&& mkdir -p /usr/local/bin
COPY --from=BASE /opt/bb /usr/local/bin/bb
2020-02-09 21:55:12 +00:00
CMD ["bb"]