Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
yuejunzhang authored Sep 4, 2023
1 parent 0c3f1c5 commit acd6a3a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FROM golang:1.20.3-alpine as builder
ENV CGO_ENABLED=0

# Set the working directory
WORKDIR /go/src/github.com/zhangyuejun/ChatGPT-to-API
WORKDIR github.com/zhangyuejun/ChatGPT-to-API

# Copy the Go Modules manifests (go.mod and go.sum files)
COPY go.mod go.sum ./
Expand All @@ -18,16 +18,16 @@ RUN go mod download
COPY . .

# Build the Go application and output the binary to /app/ChatGPT-Proxy-V4
RUN go build -o /go/src/github.com/zhangyuejun/ChatGPT-to-API
RUN go build -o github.com/zhangyuejun/ChatGPT-to-API

# Use a scratch image as the final distroless image
FROM scratch

# Set the working directory
WORKDIR /go/src/github.com/zhangyuejun/ChatGPT-to-API
WORKDIR github.com/zhangyuejun/ChatGPT-to-API

# Copy the built Go binary from the builder stage
COPY --from= /go/src/github.com/zhangyuejun/ChatGPT-to-API ./
COPY --from= github.com/zhangyuejun/ChatGPT-to-API ./

# Expose the port where the application is running
EXPOSE 8080
Expand Down

0 comments on commit acd6a3a

Please sign in to comment.