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/*
|
|
|
|
|
2024-09-24 18:34:05 +03:00
|
|
|
# Bind readonly & copy files in to avoid modifying host files
|
2024-09-21 09:23:24 +03:00
|
|
|
WORKDIR /usr/src/kinode
|
|
|
|
|
|
|
|
# Set the default command to run the build script
|
2024-09-24 18:34:05 +03:00
|
|
|
# TODO: once build is idempotent, remove the `rm -rf` line
|
|
|
|
CMD ["/bin/bash", "-c", ". ~/.bashrc && . ~/.cargo/env && . $NVM_DIR/nvm.sh && rm -rf target/ kinode/packages/*/pkg/*wasm kinode/packages/*/*/target/ kinode/packages/*/pkg/api.zip kinode/packages/*/*/wit && ./scripts/build-release.py && cp -r /tmp/kinode-release/* /output && chmod 664 /output/* && rm -rf target/ kinode/packages/*/pkg/*wasm kinode/packages/*/*/target/ kinode/packages/*/pkg/api.zip kinode/packages/*/*/wit"]
|