Sign inSign up

weblinuxgame/short-url

By weblinuxgame

•Updated over 5 years ago

Image
0

190

weblinuxgame/short-url repository overview


FROM golang:1.15-alpine AS builder

LABEL stage=gobuilder

ENV CGO_ENABLED 0
ENV GOOS linux
ENV GO111MODULE on
ENV GOPROXY https://goproxy.cn,direct

WORKDIR /build/zero

ADD go.mod .
ADD go.sum .
RUN go mod download
COPY . .
RUN go build -ldflags="-s -w" -o /app/shortUrlServ /build/zero/cmd/server/app.go


FROM alpine

RUN apk update --no-cache && apk add --no-cache ca-certificates tzdata
ENV TZ Asia/Jakarta

WORKDIR /app
COPY --from=builder /app/shortUrlServ /app/bin/shortUrlServ
ADD config/ /app/config

EXPOSE 80
VOLUME /app/config

CMD ["/app/bin/shortUrlServ","-c","/app/config/app.yml"]

Tag summary

Content type

Image

Digest

Size

8.4 MB

Last updated

over 5 years ago

docker pull weblinuxgame/short-url:v1.0.2