From a2bd3a85f5686041f8c70d52c1e4943703ba14ac Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sun, 8 Mar 2020 16:34:00 +0100 Subject: [PATCH] update modules --- Dockerfile | 9 +++++---- go.mod | 2 +- go.sum | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index cebfefd..76e6085 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" \ No newline at end of file +CMD "/app/binary" \ No newline at end of file diff --git a/go.mod b/go.mod index e327643..04ce100 100644 --- a/go.mod +++ b/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 diff --git a/go.sum b/go.sum index 9833c56..b25c5b9 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,2 @@ -git.xdrm.io/go/aicra v0.2.0 h1:Hn5g4qFikAjC7l4uaWD41eiJhYLlAUsjnAx9H0r6WNQ= +git.xdrm.io/go/aicra v0.2.0 h1:CHXkNA13xH4cnZD/on0i+lcwaAEVnI2QFeFfK9mVpcM= git.xdrm.io/go/aicra v0.2.0/go.mod h1:ulAzCdKqUN5X4eWQSER70QXSYteSXtybAqupcUuYPdw=