update modules
This commit is contained in:
parent
74537bc0a8
commit
a2bd3a85f5
|
@ -3,15 +3,16 @@ FROM golang:alpine as builder
|
|||
ENV GO111MODULE=on
|
||||
RUN apk add git
|
||||
ADD . /app
|
||||
|
||||
WORKDIR /app
|
||||
RUN go get -d ./...
|
||||
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o tiny-url
|
||||
RUN go mod download
|
||||
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o binary
|
||||
|
||||
FROM alpine:latest as production
|
||||
RUN mkdir /app
|
||||
COPY --from=builder /app/tiny-url /app
|
||||
COPY --from=builder /app/binary /app
|
||||
COPY --from=builder /app/api.json /app
|
||||
|
||||
WORKDIR /app
|
||||
EXPOSE 4242/tcp
|
||||
CMD "/app/tiny-url"
|
||||
CMD "/app/binary"
|
2
go.mod
2
go.mod
|
@ -1,5 +1,5 @@
|
|||
module git.xdrm.io/go/tiny-url-ex
|
||||
|
||||
go 1.12
|
||||
go 1.14
|
||||
|
||||
require git.xdrm.io/go/aicra v0.2.0
|
||||
|
|
Loading…
Reference in New Issue