IPFS_SERVER_1 / Dockerfile
quanvndzai's picture
Upload 7 files
11bdd8d verified
raw
history blame contribute delete
686 Bytes
FROM python:3.12.5-bookworm
# Setting up IPFS Kubo
RUN wget https://dist.ipfs.tech/kubo/v0.29.0/kubo_v0.29.0_linux-amd64.tar.gz
RUN tar -xvzf kubo_v0.29.0_linux-amd64.tar.gz
WORKDIR /kubo
# RUN ls
RUN ./install.sh
# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 2710 user
# Switch to the "user" user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/src
COPY --chown=user . $HOME/src
RUN mkdir .ipfs
RUN chmod 777 $HOME/src/.ipfs
RUN chmod 777 $HOME
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
RUN chmod +x ./entrypoint.sh
EXPOSE 7860
ENTRYPOINT [ "./entrypoint.sh" ]