narugo's picture
Upload directory 'repo', on 2024-06-10 10:41:35 UTC
8aa0467 verified
raw
history blame
1.44 kB
FROM python:3.8.1
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN apt-get update && \
apt-get install -y sudo tmux wget curl htop make tree nano vim cloc && \
apt-get install -y graphviz pandoc && \
apt-get install -y iputils-ping telnet && \
apt-get install -y git git-lfs
RUN --mount=type=secret,id=PASSWORD,mode=0444,required=true \
useradd -m -u 1000 user && \
echo "user:$(cat /run/secrets/PASSWORD)" | chpasswd && \
adduser user sudo
RUN pip install -U pip pysocks
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
USER user
ENV HOME=/home/user
ENV PATH=$HOME/.local/bin:$PATH
ENV SHELL=/bin/bash
WORKDIR $HOME
RUN mkdir -p $HOME/runner && \
cd $HOME/runner && \
curl -o actions-runner-linux-x64-2.317.0.tar.gz -L https://github.com/actions/runner/releases/download/v2.317.0/actions-runner-linux-x64-2.317.0.tar.gz && \
echo "9e883d210df8c6028aff475475a457d380353f9d01877d51cc01a17b2a91161d actions-runner-linux-x64-2.317.0.tar.gz" | shasum -a 256 -c && \
tar xzf ./actions-runner-linux-x64-2.317.0.tar.gz
COPY --chown=user . $HOME/app
RUN cp $HOME/app/how_to_use_github_action_runner.md $HOME/how_to_use_github_action_runner.md
COPY .bashrc $HOME/.bashrc_append
RUN cat $HOME/.bashrc_append >> $HOME/.bashrc && \
rm $HOME/.bashrc_append
EXPOSE 7860
ENTRYPOINT []
CMD ["/bin/bash", "./app/run.sh"]