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:
Marko Budiselic 2017-10-08 14:18:27 +01:00
parent 9e744bc7dc
commit 7a14e09dfc
2 changed files with 23 additions and 1 deletions

2
tools/.gitignore vendored
View File

@ -1,2 +1,2 @@
build
build/
csv_to_snapshot

View 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"]