first commit
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
# Build stage
|
||||
FROM golang:1.21-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY main.go ./
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o nats-ui main.go
|
||||
|
||||
# Runtime stage
|
||||
FROM alpine:3.19
|
||||
|
||||
RUN apk --no-cache add ca-certificates tzdata
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/nats-ui .
|
||||
COPY index.html config.yaml ./
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["./nats-ui"]
|
||||
CMD ["config.yaml"]
|
||||
Reference in New Issue
Block a user