Skip to content

Commit

Permalink
Use ollama as base image
Browse files Browse the repository at this point in the history
  • Loading branch information
tanyav2 committed Jan 22, 2025
1 parent 49d4183 commit 7630c96
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
FROM ghcr.io/tinfoilanalytics/nitro-attestation-shim:v0.2.2 AS shim

FROM ollama/ollama AS ollama

FROM golang:1.22 AS build
WORKDIR /app
COPY main.go go.mod ./
RUN CGO_ENABLED=0 GOOS=linux go build -o /contentmod main.go

FROM alpine:3
RUN apk add --no-cache iproute2 ca-certificates
FROM ollama/ollama

RUN apt-get update && apt-get install -y iproute2

# Copy in the shim, the Ollama binary, and your Go app
# Copy in the shim, your Go binary, and the start script
COPY --from=shim /nitro-attestation-shim /nitro-attestation-shim
COPY --from=ollama /bin/ollama /bin/ollama
COPY --from=build /contentmod /contentmod

# Copy the start script
COPY start.sh /start.sh
RUN chmod +x /start.sh

ENV HOME=/
ENV PORT=80

ENTRYPOINT ["/nitro-attestation-shim", "-e", "[email protected]", "-u", "80", "--", "/start.sh"]
# Wrap your start.sh with the shim
ENTRYPOINT ["/nitro-attestation-shim", "-e", "[email protected]", "-u", "80", "--", "/start.sh"]

0 comments on commit 7630c96

Please sign in to comment.