Add initial dockerfile and .dockerignore
This commit is contained in:
parent
219f099b0c
commit
d3550357d1
18
.dockerignore
Normal file
18
.dockerignore
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
.git
|
||||||
|
.travis.yml
|
||||||
|
.idea
|
||||||
|
bin
|
||||||
|
db
|
||||||
|
.gitignore
|
||||||
|
environments
|
||||||
|
integration_test
|
||||||
|
LICENSE
|
||||||
|
postgraphile
|
||||||
|
.private_blockchain_password
|
||||||
|
README.md
|
||||||
|
scripts
|
||||||
|
Supfile
|
||||||
|
test_config
|
||||||
|
.travis.yml
|
||||||
|
vulcanizedb.log
|
||||||
|
|
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
FROM golang:alpine as builder
|
||||||
|
RUN apk --update --no-cache add make git g++
|
||||||
|
|
||||||
|
# Build statically linked vDB binary (wonky path because of Dep)
|
||||||
|
RUN mkdir -p /go/src/github.com/vulcanize/vulcanizedb
|
||||||
|
ADD . /go/src/github.com/vulcanize/vulcanizedb
|
||||||
|
WORKDIR /go/src/github.com/vulcanize/vulcanizedb
|
||||||
|
RUN GCO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' .
|
||||||
|
|
||||||
|
# Second stage
|
||||||
|
FROM scratch
|
||||||
|
COPY --from=builder /go/src/github.com/vulcanize/vulcanizedb/vulcanizedb /app/vulcanizedb
|
||||||
|
WORKDIR /app
|
||||||
|
CMD ["./vulcanizedb", "--help"]
|
Loading…
Reference in New Issue
Block a user