-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
36 lines (27 loc) · 1.02 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM golang:alpine as builder
# RUN apk update && apk upgrade --no-cache && apk add --no-cache ca-certificates
RUN apk update && apk upgrade --no-cache
WORKDIR /src
COPY . .
RUN go build -trimpath -gcflags=all="-B" -ldflags="-s -w -buildid=" -o ovai ./cmd/ovai/main.go
FROM prantlf/healthchk:0 as healthchk
# FROM gcr.io/distroless/static-debian12
FROM busybox:stable
LABEL maintainer="Ferdinand Prantl <[email protected]>"
# RUN apt-get update -y && apt-get upgrade -y && \
# apt-get install -y --no-install-recommends ca-certificates && \
# apt-get clean && apt-get autoremove && \
# rm -rf /var/cache/apt/archives/* && rm -rf /var/lib/apt/lists/*
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /src/ovai /
COPY --from=healthchk /healthchk /
WORKDIR /
EXPOSE 22434
ENTRYPOINT ["/ovai"]
ARG DEBUG=ovai,ovai:srv
ENV DEBUG=${DEBUG}
ENV PORT=22434
ENV NETWORK=
ENV OLLAMA_ORIGIN=
# HEALTHCHECK --interval=5m \
# CMD /healthchk http://localhost:22434/api/ping || exit 1