2021-03-30 18:08:51 +08:00
FROM centos:7
2021-07-20 21:25:12 +08:00
ARG TOOLCHAIN_VERSION
2021-03-30 18:08:51 +08:00
RUN yum -y update \
&& yum install -y wget git
# Do NOT be smart here and clean the cache because the container is used in the
# stateful context.
2024-03-14 19:19:59 +08:00
RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-${ TOOLCHAIN_VERSION } /toolchain-${ TOOLCHAIN_VERSION } -binaries-centos-7-x86_64.tar.gz \
-O toolchain-${ TOOLCHAIN_VERSION } -binaries-centos-7-x86_64.tar.gz \
&& tar xzvf toolchain-${ TOOLCHAIN_VERSION } -binaries-centos-7-x86_64.tar.gz -C /opt \
&& rm toolchain-${ TOOLCHAIN_VERSION } -binaries-centos-7-x86_64.tar.gz
# Install toolchain run deps and memgraph build deps
SHELL [ "/bin/bash" , "-c" ]
RUN git clone https://github.com/memgraph/memgraph.git \
&& cd memgraph \
&& ./environment/os/centos-7.sh install TOOLCHAIN_RUN_DEPS \
&& ./environment/os/centos-7.sh install MEMGRAPH_BUILD_DEPS \
&& cd .. && rm -rf memgraph
# Add mgdeps-cache and bench-graph-api hostnames
RUN echo -e "10.42.16.10 mgdeps-cache\n10.42.16.10 bench-graph-api" >> /etc/hosts
# Create mg user and set as default
RUN useradd -m -s /bin/bash mg
USER mg
# Install rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# Fix node
RUN curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
# Install PyYAML (only for amzn-2, centos-7, cento-9 and rocky-9)
RUN pip3 install --user PyYAML
2021-03-30 18:08:51 +08:00
ENTRYPOINT [ "sleep" , "infinity" ]