2021-09-08 23:37:19 +00:00
|
|
|
FROM golang:1.17-alpine AS build
|
2021-01-15 21:44:25 +00:00
|
|
|
RUN apk update && apk add --no-cache git
|
|
|
|
RUN apk --no-cache add ca-certificates
|
|
|
|
|
2021-07-08 01:15:37 +00:00
|
|
|
WORKDIR /build/tytanium
|
2021-01-15 21:44:25 +00:00
|
|
|
|
|
|
|
COPY go.mod ./
|
|
|
|
RUN go mod download
|
|
|
|
|
|
|
|
COPY . ./
|
2021-07-08 01:15:37 +00:00
|
|
|
RUN CGO_ENABLED=0 go build -o /bin/tytanium
|
2021-01-15 21:44:25 +00:00
|
|
|
|
|
|
|
FROM scratch
|
|
|
|
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
2021-07-08 01:15:37 +00:00
|
|
|
COPY --from=build /bin/tytanium /bin/tytanium
|
|
|
|
COPY --from=build /build/tytanium/conf /bin/conf
|
2021-01-15 21:44:25 +00:00
|
|
|
|
|
|
|
WORKDIR /bin
|
|
|
|
EXPOSE 3030
|
2021-07-08 01:15:37 +00:00
|
|
|
ENTRYPOINT ["tytanium"]
|