2017-10-08 21:18:27 +08:00
|
|
|
FROM debian:stretch
|
|
|
|
|
2017-10-25 21:28:10 +08:00
|
|
|
COPY mg_import_csv /usr/local/bin/mg_import_csv
|
2017-10-08 21:18:27 +08:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2017-10-25 21:28:10 +08:00
|
|
|
ENTRYPOINT ["mg_import_csv"]
|
2017-10-08 21:18:27 +08:00
|
|
|
# Print help and usage by default, since at least one --nodes argument is
|
|
|
|
# required.
|
|
|
|
CMD ["--help"]
|