mirror of
https://github.com/alexgo-io/gaze-brc20-indexer.git
synced 2026-01-12 14:34:54 +08:00
28 lines
563 B
Docker
28 lines
563 B
Docker
FROM golang:1.24.1 as builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN --mount=type=cache,target=/go/pkg/mod/ go mod download
|
|
|
|
COPY ./ ./
|
|
|
|
ENV GOOS=linux
|
|
ENV CGO_ENABLED=0
|
|
|
|
RUN --mount=type=cache,target=/go/pkg/mod/ \
|
|
go build -o main ./main.go
|
|
|
|
FROM alpine:latest
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apk --no-cache add ca-certificates tzdata
|
|
|
|
COPY --from=builder /app/main /usr/local/bin/brc20-indexer
|
|
|
|
# You can set TZ identifier to change the timezone, See https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
|
|
# ENV TZ=US/Central
|
|
|
|
ENTRYPOINT ["brc20-indexer"]
|