2024-03-14 19:19:59 +08:00
FROM debian:12
ARG TOOLCHAIN_VERSION
# Stops tzdata interactive configuration.
ENV DEBIAN_FRONTEND = noninteractive
RUN apt update && apt install -y \
ca-certificates wget git
# Do NOT be smart here and clean the cache because the container is used in the
# stateful context.
RUN wget -q https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-${ TOOLCHAIN_VERSION } /toolchain-${ TOOLCHAIN_VERSION } -binaries-debian-12-arm64.tar.gz \
-O toolchain-${ TOOLCHAIN_VERSION } -binaries-debian-12-arm64.tar.gz \
&& tar xzvf toolchain-${ TOOLCHAIN_VERSION } -binaries-debian-12-arm64.tar.gz -C /opt \
&& rm toolchain-${ TOOLCHAIN_VERSION } -binaries-debian-12-arm64.tar.gz
# Install toolchain run deps and memgraph build deps
2024-03-20 17:55:44 +08:00
ARG GIT_REF = master
2024-03-14 19:19:59 +08:00
SHELL [ "/bin/bash" , "-c" ]
2024-03-20 17:55:44 +08:00
RUN git clone --branch ${ GIT_REF } https://github.com/memgraph/memgraph.git \
2024-03-14 19:19:59 +08:00
&& cd memgraph \
&& ./environment/os/debian-12-arm.sh install TOOLCHAIN_RUN_DEPS \
&& ./environment/os/debian-12-arm.sh install MEMGRAPH_BUILD_DEPS \
&& cd .. && rm -rf memgraph
# 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
ENTRYPOINT [ "sleep" , "infinity" ]