forked from aurora-develop/aurora
-
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
1 parent
d321f6a
commit 89d29c1
Showing
2 changed files
with
5 additions
and
20 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
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,36 +1,21 @@ | ||
# Use the official Golang image as the builder | ||
FROM golang:1.20.3-alpine as builder | ||
|
||
# Enable CGO to use C libraries (set to 0 to disable it) | ||
# We set it to 0 to build a fully static binary for our final image | ||
ENV CGO_ENABLED=0 | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Copy the Go Modules manifests (go.mod and go.sum files) | ||
COPY go.mod go.sum ./ | ||
|
||
# Download the dependencies | ||
RUN go mod download | ||
|
||
# Copy the source code | ||
COPY . . | ||
RUN go build -o /app/Aurora . | ||
|
||
# Build the Go application and output the binary to /app/ChatGPT-Proxy-V4 | ||
RUN go build -o /app/ChatGPT-To-API . | ||
|
||
# Use a scratch image as the final distroless image | ||
FROM scratch | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Copy the built Go binary from the builder stage | ||
COPY --from=builder /app/ChatGPT-To-API /app/ChatGPT-To-API | ||
COPY --from=builder /app/Aurora /app/Aurora | ||
|
||
# Expose the port where the application is running | ||
EXPOSE 8080 | ||
|
||
# Start the application | ||
CMD [ "./ChatGPT-To-API" ] | ||
CMD [ "./Aurora" ] |