Spaces:
Runtime error
Runtime error
File size: 1,304 Bytes
14754f1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
FROM debian:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
wget git python3 python3-pip unzip tar curl build-essential \
vim nano htop net-tools iputils-ping ca-certificates \
software-properties-common \
openssh-client \
lsof \
strace \
tcpdump \
jq \
zip \
gzip \
bzip2 \
python3-venv \
golang \
ruby \
default-jdk \
nodejs \
npm \
bubblewrap && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN npm install -g npm@latest
RUN npm install -g gritty@8.1.2
ENV HOME=/home/admin \
PATH=/home/admin/.local/bin:$PATH
WORKDIR $HOME/app
RUN useradd -m admin && \
echo "admin:admin" | chpasswd && \
usermod -aG sudo admin
RUN echo '#!/bin/bash\n\
echo "===================================="\n\
echo "Starting isolated environment with bubblewrap"\n\
echo "===================================="\n\
# go to bubblewrap \n\
exec bwrap --bind / / --bind /tmp /tmp --dev /dev --proc /proc --ro-bind /usr /usr --ro-bind /lib /lib --ro-bind /lib64 /lib64 --new-session /bin/bash' > $HOME/startup.sh && \
chmod +x $HOME/startup.sh
EXPOSE 7860
USER admin
CMD ["gritty", "--port", "7860", "--command", "/home/admin/startup.sh", "--auto-restart"] |