ai-courseware/eino-project/Dockerfile

27 lines
512 B
Docker

FROM golang:1.23 AS builder
COPY . /src
WORKDIR /src
RUN GOPROXY=https://goproxy.cn GOTOOLCHAIN=auto make build
FROM debian:stable-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
netbase \
curl \
&& rm -rf /var/lib/apt/lists/ \
&& apt-get autoremove -y && apt-get autoclean -y
COPY --from=builder /src/bin /app
WORKDIR /app
EXPOSE 8302
EXPOSE 9302
VOLUME /app/data
VOLUME /app/configs
CMD ["./server", "-conf", "/app/configs"]