forked from cristianstaicu/SecBench.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
56 lines (48 loc) · 1.77 KB
/
Dockerfile
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
53
54
55
# FROM ubuntu:18.04
# RUN apt-get update && apt-get install -y \
# nodejs \
# npm \
# git
# RUN mkdir -m 700 /root/.ssh && \
# touch -m 600 /root/.ssh/known_hosts && \
# ssh-keyscan your-git-provider.com > /root/.ssh/known_hosts
# COPY id_rsa /root/.ssh/id_rsa
# Clone the conf files into the docker container
# RUN git clone [email protected]:cristianstaicu/vulns4js.git
# this is our first build stage, it will not persist in the final image
FROM ubuntu:18.04 as intermediate
# # install git
RUN apt-get update
RUN apt-get install -y git
RUN apt-get install -y curl
RUN apt-get install -y zip
RUN apt-get install -y psmisc
RUN apt-get install -y yarn
RUN apt-get install -y nano
RUN apt-get install -y g++
RUN apt-get install -y make
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
RUN . ~/.bashrc
RUN set -x \
&& curl -sL 'https://deb.nodesource.com/setup_16.x' | bash - \
&& apt-get -y install nodejs \
&& ln -s /usr/bin/nodejs /usr/local/bin/node
# add credentials on build
ARG SSH_PRIVATE_KEY
# RUN mkdir /root/.ssh/
# RUN echo "${SSH_PRIVATE_KEY}" > /root/.ssh/id_rsa
RUN mkdir /root/.ssh/ &&\
echo "${SSH_PRIVATE_KEY}" > /root/.ssh/id_rsa &&\
chmod 600 /root/.ssh/id_rsa &&\
touch /root/.ssh/known_hosts &&\
ssh-keyscan github.com >> /root/.ssh/known_hosts
# # make sure your domain is accepted
# RUN touch /root/.ssh/known_hosts
# RUN ssh-keyscan bitbucket.org >> /root/.ssh/known_hosts
RUN npm install -g --save-dev jest
RUN git clone [email protected]:cristianstaicu/vulns4js.git /home/vulns4js
# RUN npm install -g --save-dev jest
# FROM ubuntu
# # copy the repository form the previous image
# COPY --from=intermediate /home/vulns4js /srv/your-repo