Improve Dockerfile, add .dockerignore (#273)
This commit is contained in:
parent
2024d09455
commit
761e7995f7
2 changed files with 25 additions and 8 deletions
18
.dockerignore
Normal file
18
.dockerignore
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
.circleci/
|
||||
.git/
|
||||
.clj-kondo/
|
||||
.github/
|
||||
doc/
|
||||
examples/
|
||||
logo/
|
||||
test-resources/
|
||||
test/
|
||||
.gitignore
|
||||
.carve_ignore
|
||||
.gitmodules
|
||||
appveyor.yml
|
||||
CHANGES.md
|
||||
deps.edn
|
||||
Dockerfile
|
||||
LICENSE
|
||||
README.md
|
||||
15
Dockerfile
15
Dockerfile
|
|
@ -1,20 +1,19 @@
|
|||
FROM ubuntu AS BASE
|
||||
FROM clojure:lein-2.9.1 AS BASE
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -yy curl unzip build-essential zlib1g-dev
|
||||
RUN apt update
|
||||
RUN apt install --no-install-recommends -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-java8-19.3.1"
|
||||
ENV JAVA_HOME="/opt/graalvm-ce-java8-19.3.1/bin"
|
||||
ENV PATH="$PATH:$JAVA_HOME"
|
||||
ENV BABASHKA_STATIC="true"
|
||||
COPY . .
|
||||
RUN apt install -y sudo
|
||||
RUN ./.circleci/script/install-leiningen
|
||||
RUN ./script/compile
|
||||
RUN cp bb /usr/local/bin
|
||||
|
||||
|
||||
FROM ubuntu:bionic
|
||||
COPY --from=BASE /usr/local/bin/bb /usr/local/bin
|
||||
FROM scratch
|
||||
|
||||
COPY --from=BASE /opt/bb /bin/bb
|
||||
CMD ["bb"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue