-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (24 loc) · 1.07 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Build supervisor and graph-tool with go
FROM golang:1.23-alpine AS supervisor
# Label is used in makefile to delete intermediate images from multistage build
LABEL stage=supervisor_builder
WORKDIR /go/src/github.com/indykite/neo4j-graph-tool
COPY . .
ENV GO111MODULE=on
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -buildvcs=false -ldflags "-w -s -extldflags \"-static\"" -o supervisor && \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -buildvcs=false -ldflags "-w -s -extldflags \"-static\"" -o graph-tool cli/main.go && \
chmod u+x ./supervisor ./graph-tool ./entrypoint.sh
# Build final image
FROM neo4j:5.26-enterprise
COPY --from=supervisor \
/go/src/github.com/indykite/neo4j-graph-tool/supervisor \
/go/src/github.com/indykite/neo4j-graph-tool/graph-tool \
/go/src/github.com/indykite/neo4j-graph-tool/entrypoint.sh \
/go/src/github.com/indykite/neo4j-graph-tool/config.toml \
/app/
COPY ./import /initial-data/import
EXPOSE 7474 7473 7687 8080
ENV NEO4J_ACCEPT_LICENSE_AGREEMENT yes
ENTRYPOINT ["tini", "--", "/app/entrypoint.sh"]