keepmove commited on
Commit
14754f1
·
verified ·
1 Parent(s): ce2b068

Create Dockerfile

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