From 6ab925b7e0c69c3cd11e6ea360c8fc2b05c729de Mon Sep 17 00:00:00 2001 From: mudler Date: Sat, 29 Apr 2023 23:56:53 +0200 Subject: [PATCH] feat: add old Dockerfile logic in Dockerfile.dev --- Dockerfile.dev | 14 ++++++++++++++ docker-compose.yaml | 4 ++-- examples/chatbot-ui/docker-compose.yaml | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 Dockerfile.dev diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 00000000..16c84476 --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,14 @@ +ARG GO_VERSION=1.20 +ARG DEBIAN_VERSION=11 +ARG BUILD_TYPE= + +FROM golang:$GO_VERSION as builder +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 +EXPOSE 8080 +ENTRYPOINT [ "/usr/bin/local-ai" ] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 8058e467..f7d76538 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -5,11 +5,11 @@ services: image: quay.io/go-skynet/local-ai:latest build: context: . - dockerfile: Dockerfile + dockerfile: Dockerfile.dev ports: - 8080:8080 env_file: - .env volumes: - ./models:/models:cached - command: ["/usr/bin/local-ai" ] \ No newline at end of file + command: ["/usr/bin/local-ai" ] diff --git a/examples/chatbot-ui/docker-compose.yaml b/examples/chatbot-ui/docker-compose.yaml index c7782c34..a5f94aca 100644 --- a/examples/chatbot-ui/docker-compose.yaml +++ b/examples/chatbot-ui/docker-compose.yaml @@ -5,7 +5,7 @@ services: image: quay.io/go-skynet/local-ai:latest build: context: ../../ - dockerfile: Dockerfile + dockerfile: Dockerfile.dev ports: - 8080:8080 environment: