OSDN Git Service

add fedd dockerfile (#339)
authorHAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Sat, 20 Jul 2019 05:49:09 +0000 (13:49 +0800)
committerPaladz <yzhu101@uottawa.ca>
Sat, 20 Jul 2019 05:49:09 +0000 (13:49 +0800)
fed.Dockerfile [new file with mode: 0644]

diff --git a/fed.Dockerfile b/fed.Dockerfile
new file mode 100644 (file)
index 0000000..9003ec2
--- /dev/null
@@ -0,0 +1,17 @@
+# Build fedd in a stock Go builder container
+FROM golang:1.12-alpine as builder
+
+RUN apk add --no-cache make git
+
+ADD . /go/src/github.com/vapor
+WORKDIR /go/src/github.com/vapor/cmd/fedd
+
+RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -installsuffix cgo -o fed main.go
+
+# Pull Bytom into a second stage deploy alpine container
+FROM alpine:latest
+
+RUN apk add --no-cache ca-certificates
+COPY --from=builder /go/src/github.com/vapor/cmd/fedd/fed /usr/local/bin/
+
+EXPOSE 9886