remove cgo disable pam by default

This commit is contained in:
Boshi Lian 2020-12-02 19:10:43 +00:00
parent 90a4e638f7
commit ee4c7e26b5
4 changed files with 6 additions and 6 deletions

View file

@ -1,15 +1,14 @@
FROM golang:1.14-alpine as builder
FROM golang:1.15-alpine as builder
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/
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
RUN CGO_ENABLED=0 go build -ldflags "$(/go/src/github.com/tg123/sshpiper/sshpiperd/ldflags.sh)" -o /go/bin/sshpiperd
FROM alpine:latest
@ -21,8 +20,6 @@ RUN apk update \
ca-certificates \
&& update-ca-certificates 2>/dev/null
RUN apk add google-authenticator
RUN mkdir /etc/ssh/
ADD entrypoint.sh /