mirror of https://github.com/dtm-labs/dtm.git
csharpjavadistributed-transactionsdtmgogolangmicroservicenodejsphpdatabasesagaseatatcctransactiontransactionsxapythondistributed
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
430 B
14 lines
430 B
# syntax=docker/dockerfile:1
|
|
FROM --platform=$TARGETPLATFORM golang:1.16-alpine as builder
|
|
ARG TARGETARCH
|
|
ARG TARGETOS
|
|
WORKDIR /app/dtm
|
|
# RUN go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct
|
|
EXPOSE 8080
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags="-s -w"
|
|
|
|
FROM --platform=$TARGETPLATFORM alpine
|
|
COPY --from=builder /app/dtm/dtm /app/dtm/
|
|
WORKDIR /app/dtm
|
|
ENTRYPOINT ["/app/dtm/dtm"]
|
|
|