nectar/Dockerfile.buildruntime

24 lines
737 B
Docker
Raw Normal View History

2024-09-21 09:23:24 +03:00
FROM nick1udwig/buildbase:latest
ENV NVM_DIR=/root/.nvm \
PATH="/root/.nvm/versions/node/$(node -v)/bin:${PATH}"
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
python3 \
&& rm -rf /var/lib/apt/lists/*
# Clone the repository and prepare for build
WORKDIR /usr/src
RUN git clone https://github.com/kinode-dao/kinode.git
WORKDIR /usr/src/kinode
# Allow setting BRANCH_NAME at run time like
# `-e BRANCH_NAME=foo-bar`
ARG BRANCH=main
ENV BRANCH_NAME=$BRANCH
RUN git checkout $BRANCH_NAME
2024-09-21 09:23:24 +03:00
# Set the default command to run the build script
CMD ["/bin/bash", "-c", ". ~/.bashrc && . ~/.cargo/env && . $NVM_DIR/nvm.sh && ./scripts/build-release.py && cp -r /tmp/kinode-release/* /output"]