move to go mod (#38)

Move to go 1.12 mod
This commit is contained in:
Boshi Lian 2019-08-20 16:29:18 -07:00 committed by GitHub
parent b5480d9cf3
commit 2f8cef360d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
966 changed files with 208 additions and 782575 deletions

View file

@ -1,15 +1,21 @@
FROM golang:latest as builder
FROM golang:1.12-alpine as builder
RUN apt-get update && apt-get install -y libpam0g-dev
RUN apk update \
&& apk upgrade \
&& apk add --no-cache \
ca-certificates \
&& update-ca-certificates 2>/dev/null
RUN apk add google-authenticator git gcc libc-dev linux-pam-dev
ADD . /go/src/github.com/tg123/sshpiper/
RUN go install -ldflags "$(/go/src/github.com/tg123/sshpiper/sshpiperd/ldflags.sh)" -tags pam github.com/tg123/sshpiper/sshpiperd
ENV GO111MODULE=on
WORKDIR /go/src/github.com/tg123/sshpiper/sshpiperd
RUN go build -ldflags "$(/go/src/github.com/tg123/sshpiper/sshpiperd/ldflags.sh)" -tags pam -o /go/bin/sshpiperd
FROM alpine:latest
LABEL maintainer="Boshi Lian<farmer1992@gmail.com>"
RUN mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
RUN apk update \
&& apk upgrade \
&& apk add --no-cache \