mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-18 04:10:51 +08:00
- Added `.github/workflows/docker-image.yml` for automated Docker image build and push on version tags. - Created `Dockerfile` to containerize the application. - Updated README with instructions for running the application using Docker.
23 lines
338 B
Docker
23 lines
338 B
Docker
FROM golang:1.24-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod go.sum ./
|
|
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o ./CLIProxyAPI ./cmd/server/
|
|
|
|
FROM alpine:3.22.0
|
|
|
|
RUN mkdir /CLIProxyAPI
|
|
|
|
COPY --from=builder ./app/CLIProxyAPI /CLIProxyAPI/CLIProxyAPI
|
|
|
|
WORKDIR /CLIProxyAPI
|
|
|
|
EXPOSE 8317
|
|
|
|
CMD ["./CLIProxyAPI"] |