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.
15 lines
474 B
15 lines
474 B
# syntax=docker/dockerfile:1
|
|
FROM --platform=$TARGETPLATFORM golang:1.16.6-alpine3.14 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" app/main.go
|
|
|
|
FROM --platform=$TARGETPLATFORM alpine:3.14
|
|
COPY --from=builder /app/dtm/main /app/dtm/
|
|
ENV IS_DOCKER=1
|
|
WORKDIR /app/dtm
|
|
CMD ["/app/dtm/main", "dtmsvr"]
|
|
|