mirror of
https://github.com/jimeh/casecmp.git
synced 2026-02-19 02:16:40 +00:00
chore(go): update project for go 1.16 (modules, etc)
This commit is contained in:
24
Dockerfile
24
Dockerfile
@@ -1,18 +1,14 @@
|
||||
FROM golang:1.10-alpine as builder
|
||||
RUN set -e \
|
||||
&& apk add --no-cache git \
|
||||
&& wget -O - https://github.com/golang/dep/raw/master/install.sh | sh
|
||||
|
||||
WORKDIR /go/src/github.com/jimeh/casecmp
|
||||
ADD . /go/src/github.com/jimeh/casecmp
|
||||
RUN set -e \
|
||||
&& dep ensure \
|
||||
&& CGO_ENABLED=0 go build -a -o /casecmp \
|
||||
-ldflags "-s -w \
|
||||
-X main.version=$(cat VERSION) \
|
||||
-X main.commit=$(git show --format='%h' --no-patch)\
|
||||
-X main.date=$(date +%Y-%m-%dT%T%z)"
|
||||
FROM golang:1.16-alpine as builder
|
||||
RUN apk add --no-cache \
|
||||
git
|
||||
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
RUN env CGO_ENABLED=0 \
|
||||
go build -a -o /casecmp -ldflags "-s -w \
|
||||
-X main.version=$(cat VERSION) \
|
||||
-X main.commit=$(git show --format='%h' --no-patch) \
|
||||
-X main.date=$(date +%Y-%m-%dT%T%z)"
|
||||
|
||||
FROM scratch
|
||||
COPY --from=builder /casecmp /
|
||||
|
||||
Reference in New Issue
Block a user