-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-buildx
77 lines (59 loc) · 2.73 KB
/
Dockerfile-buildx
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
FROM node:16
# Application mounting & permissions
COPY syscall_node/ /syscall_node/
COPY startUpScript-buildx.sh /syscall_node/startUpScript.sh
COPY syscall_node/attack.sh /
WORKDIR /syscall_node/
# FROM alpine
ENV DEBIAN_FRONTEND="noninteractive"
RUN apt-get update \
&& apt install -y wget git curl lsb-release python3-pip build-essential \
&& pip3 install python-gnupg
# Install latest Mysql
# RUN apt-get -y install mysql-server
# Add MySQL 5.7 repository
RUN wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb
RUN { \
echo 'mysql-apt-config mysql-apt-config/repo-codename select bionic'; \
echo 'mysql-apt-config mysql-apt-config/repo-distro select ubuntu'; \
echo 'mysql-apt-config mysql-apt-config/repo-url string http://repo.mysql.com/apt/'; \
echo 'mysql-apt-config mysql-apt-config/select-preview select '; \
echo 'mysql-apt-config mysql-apt-config/select-product select Ok'; \
echo 'mysql-apt-config mysql-apt-config/select-server select mysql-5.7'; \
echo 'mysql-apt-config mysql-apt-config/select-tools select '; \
echo 'mysql-apt-config mysql-apt-config/unsupported-platform select Ok'; \
echo 'mysql-apt-config mysql-apt-config/repo-url string http://repo.mysql.com/apt/'; \
echo 'mysql-apt-config mysql-apt-config/select-preview select '; \
echo 'mysql-apt-config mysql-apt-config/select-product select Ok'; \
} | debconf-set-selections
RUN dpkg -i mysql-apt-config_0.8.12-1_all.deb
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 \
&& apt update \
&& apt-cache policy mysql-server
# Install Mysql 5.7
RUN apt-get install -y -f mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7*
# enable login using above creds
RUN usermod -d /var/lib/mysql/ mysql \
&& MYSQLD_OPTS="--skip-grant-tables" service mysql start \
&& mysql -u root --execute="drop user root@localhost; create user 'root'@'%' identified by ''; grant all privileges on *.* to 'root'@'%' with grant option;" \
&& mysql -u root --execute="FLUSH PRIVILEGES" \
&& service mysql stop
# Install MongoDB
RUN curl -O http://downloads.mongodb.org/linux/mongodb-linux-x86_64-3.2.22.tgz \
&& tar -zxvf mongodb-linux-x86_64-3.2.22.tgz \
&& mkdir -p /data/db \
&& rm -rf mongodb-linux-x86_64-3.2.22.tgz
ENV NVM_DIR /root/.nvm
RUN curl -LsS https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \
&& . $NVM_DIR/nvm.sh
# COPY --from=builder /syscall_node /syscall_node
RUN chmod 777 /syscall_node/startUpScript.sh
RUN chmod 777 /syscall_node/attack.sh
WORKDIR /syscall_node/
ENV NEW_RELIC_SECURITY_CONFIG_PATH=""
ENV NEW_RELIC_LOG_LEVEL=""
ENV NR_OPTS=""
ENV APM_BRANCH=""
ENV CSEC_BRANCH=""
ENV NODE_VERSION=""
CMD ["/bin/bash","-c","/syscall_node/startUpScript.sh && tail -f /dev/null"]