forked from tinfoilanalytics/content-moderator-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
6 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |