feat: make images to build sources on start (#124)

Signed-off-by: mudler <mudler@mocaccino.org>
This commit is contained in:
Ettore Di Giacinto 2023-04-29 20:38:37 +02:00 committed by GitHub
parent 78503c62b7
commit 16773e2a35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 10 deletions

View file

@ -1,14 +1,9 @@
ARG GO_VERSION=1.20
ARG DEBIAN_VERSION=11
ARG BUILD_TYPE=
FROM golang:$GO_VERSION as builder
FROM golang:$GO_VERSION
WORKDIR /build
RUN apt-get update && apt-get install -y cmake
COPY . .
RUN make build
FROM debian:$DEBIAN_VERSION
COPY --from=builder /build/local-ai /usr/bin/local-ai
RUN make prepare-sources
EXPOSE 8080
ENTRYPOINT [ "/usr/bin/local-ai" ]
ENTRYPOINT [ "/build/entrypoint.sh" ]