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 \ RUN apk update \
&& apk upgrade \ && apk upgrade \
&& apk add --no-cache \ && apk add --no-cache \
ca-certificates \ ca-certificates \
&& update-ca-certificates 2>/dev/null && 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/ ADD . /go/src/github.com/tg123/sshpiper/
WORKDIR /go/src/github.com/tg123/sshpiper/sshpiperd 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 FROM alpine:latest
@ -21,8 +20,6 @@ RUN apk update \
ca-certificates \ ca-certificates \
&& update-ca-certificates 2>/dev/null && update-ca-certificates 2>/dev/null
RUN apk add google-authenticator
RUN mkdir /etc/ssh/ RUN mkdir /etc/ssh/
ADD entrypoint.sh / ADD entrypoint.sh /

1
go.mod
View file

@ -27,6 +27,7 @@ require (
github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect
github.com/msteinert/pam v0.0.0-20190215180659-f29b9f28d6f9 github.com/msteinert/pam v0.0.0-20190215180659-f29b9f28d6f9
github.com/pkg/errors v0.9.1 // indirect github.com/pkg/errors v0.9.1 // indirect
github.com/tg123/sshkey v0.0.0-20201202190454-3bb356f89f1f
golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392
golang.org/x/sys v0.0.0-20200513112337-417ce2331b5c // indirect golang.org/x/sys v0.0.0-20200513112337-417ce2331b5c // indirect
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776

2
go.sum
View file

@ -82,6 +82,8 @@ github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/tg123/go-flags v1.4.0-globalref h1:pfUF3Mdnw5gZ5izA7s95Yrp+AetZPlnO9x39RByCi98= github.com/tg123/go-flags v1.4.0-globalref h1:pfUF3Mdnw5gZ5izA7s95Yrp+AetZPlnO9x39RByCi98=
github.com/tg123/go-flags v1.4.0-globalref/go.mod h1:G60U6XrJAj49cFQ8MY2Wr+SEjylerbSqj0I8FZy2tFE= github.com/tg123/go-flags v1.4.0-globalref/go.mod h1:G60U6XrJAj49cFQ8MY2Wr+SEjylerbSqj0I8FZy2tFE=
github.com/tg123/sshkey v0.0.0-20201202190454-3bb356f89f1f h1:MOxh2uC27wne9vo2OJqtL2W0Uq3qbBnaOGKgiJA+/fI=
github.com/tg123/sshkey v0.0.0-20201202190454-3bb356f89f1f/go.mod h1:0NrddipH8l+ho+Cpbs4qrpEaqbNeHUAfhxURhKC1waE=
github.com/tg123/sshpiper.crypto v0.0.0-sshpiper-20201202 h1:a2r3NdQN25cm02epOv0tfimKWNfaR4apxMk0UAIRh2E= github.com/tg123/sshpiper.crypto v0.0.0-sshpiper-20201202 h1:a2r3NdQN25cm02epOv0tfimKWNfaR4apxMk0UAIRh2E=
github.com/tg123/sshpiper.crypto v0.0.0-sshpiper-20201202/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= github.com/tg123/sshpiper.crypto v0.0.0-sshpiper-20201202/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=

View file

@ -6,7 +6,7 @@ import (
"log" "log"
"os" "os"
"github.com/gokyle/sshkey" "github.com/tg123/sshkey"
"github.com/jessevdk/go-flags" "github.com/jessevdk/go-flags"
"github.com/tg123/sshpiper/sshpiperd/auditor" "github.com/tg123/sshpiper/sshpiperd/auditor"