diff --git a/tools/.gitignore b/tools/.gitignore index cc38133f6..1e107e2a8 100644 --- a/tools/.gitignore +++ b/tools/.gitignore @@ -1,2 +1,2 @@ -build +build/ csv_to_snapshot diff --git a/tools/csv_to_snapshot.dockerfile b/tools/csv_to_snapshot.dockerfile new file mode 100644 index 000000000..ceec6cc61 --- /dev/null +++ b/tools/csv_to_snapshot.dockerfile @@ -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"]