Add Dockerfile for csv_to_snapshot packaging.
Summary: C++ implementation of CSV to Memgraph's snapshot file is much more efficient then the Python implementation. It includes a huge part of the Memgraph's source code and the code has to be compiled (which is not easy). Because of that it has to be packaged. Reviewers: teon.banek, mferencevic Reviewed By: teon.banek Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D854
This commit is contained in:
parent
9e744bc7dc
commit
7a14e09dfc
2
tools/.gitignore
vendored
2
tools/.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
build
|
||||
build/
|
||||
csv_to_snapshot
|
||||
|
22
tools/csv_to_snapshot.dockerfile
Normal file
22
tools/csv_to_snapshot.dockerfile
Normal file
@ -0,0 +1,22 @@
|
||||
FROM debian:stretch
|
||||
|
||||
COPY csv_to_snapshot /usr/local/bin/csv_to_snapshot
|
||||
|
||||
# Setup memgraph user and group.
|
||||
RUN groupadd -r memgraph
|
||||
RUN useradd -lrm -g memgraph memgraph
|
||||
|
||||
# Setup intput/output directory.
|
||||
# /data is used because that's the shortest way to reference the directory.
|
||||
RUN mkdir -p /data
|
||||
RUN chown -R memgraph:memgraph /data
|
||||
|
||||
# Change user and set working directory.
|
||||
USER memgraph:memgraph
|
||||
VOLUME /data
|
||||
WORKDIR /data
|
||||
|
||||
ENTRYPOINT ["csv_to_snapshot"]
|
||||
# Print help and usage by default, since at least one --nodes argument is
|
||||
# required.
|
||||
CMD ["--help"]
|
Loading…
Reference in New Issue
Block a user