Sign inSign up

qida/go-thrift

By qida

Updated 6 months ago

Image
Developer tools
0

5.9K

qida/go-thrift repository overview

Dockerfile

FROM qida/go-thrift:0.19.0 AS builder
LABEL maintainer "qida"

ENV GO111MODULE = "on"
ENV CGO_ENABLED = "0"

ADD .                /app/
WORKDIR /app
RUN thrift -r --gen go:package_prefix=thrift/gen-go/ --o ./thrifts ./thrifts/XXX.thrift

#编译
RUN go build


FROM alpine:latest
LABEL version "0.0.3"
RUN alpine_version=`cat /etc/issue | head -1 | awk '{print $5}'` \
  && echo -e https://mirrors.ustc.edu.cn/alpine/v${alpine_version}/main/ > /etc/apk/repositories
RUN apk update \
    && apk add --no-cache tzdata libc6-compat \
    && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo "Asia/Shanghai" > /etc/timezone \
    && rm -rf /var/cache/apk/*
WORKDIR /app
COPY --from=builder /NAME /app/NAME
RUN chmod a+rx /app/NAME
ENV LANG C.UTF-8
CMD /app/NAME

Tag summary

Content type

Image

Digest

sha256:6e9e0b384

Size

742.9 MB

Last updated

6 months ago

docker pull qida/go-thrift