mirror of
https://github.com/moul/sshportal.git
synced 2024-09-20 15:06:07 +08:00
Add Dockerfile
This commit is contained in:
parent
518aa30d61
commit
68a8d033b1
10
Dockerfile
Normal file
10
Dockerfile
Normal file
|
@ -0,0 +1,10 @@
|
|||
# build
|
||||
FROM golang:1.9 as builder
|
||||
COPY . /go/src/github.com/moul/sshportal
|
||||
WORKDIR /go/src/github.com/moul/sshportal
|
||||
RUN CGO_ENABLED=1 go build -tags netgo -ldflags '-extldflags "-static"' -v -o /go/bin/sshportal
|
||||
|
||||
# minimal runtime
|
||||
FROM scratch
|
||||
COPY --from=builder /go/bin/sshportal /bin/sshportal
|
||||
ENTRYPOINT ["/bin/sshportal"]
|
Loading…
Reference in a new issue