feat: make images to build sources on start (#124)
Signed-off-by: mudler <mudler@mocaccino.org>swagger
parent
78503c62b7
commit
16773e2a35
@ -1,14 +1,9 @@ |
|||||||
ARG GO_VERSION=1.20 |
ARG GO_VERSION=1.20 |
||||||
ARG DEBIAN_VERSION=11 |
|
||||||
ARG BUILD_TYPE= |
ARG BUILD_TYPE= |
||||||
|
FROM golang:$GO_VERSION |
||||||
FROM golang:$GO_VERSION as builder |
|
||||||
WORKDIR /build |
WORKDIR /build |
||||||
RUN apt-get update && apt-get install -y cmake |
RUN apt-get update && apt-get install -y cmake |
||||||
COPY . . |
COPY . . |
||||||
RUN make build |
RUN make prepare-sources |
||||||
|
|
||||||
FROM debian:$DEBIAN_VERSION |
|
||||||
COPY --from=builder /build/local-ai /usr/bin/local-ai |
|
||||||
EXPOSE 8080 |
EXPOSE 8080 |
||||||
ENTRYPOINT [ "/usr/bin/local-ai" ] |
ENTRYPOINT [ "/build/entrypoint.sh" ] |
||||||
|
@ -0,0 +1,7 @@ |
|||||||
|
#!/bin/bash |
||||||
|
|
||||||
|
cd /build |
||||||
|
|
||||||
|
make build |
||||||
|
|
||||||
|
./local-ai "$@" |
Loading…
Reference in new issue