Skip to content

Commit 6e64d97

Browse files
author
erencankurtaran
committed
dockerfile
1 parent 60f9ae1 commit 6e64d97

File tree

1 file changed

+57
-1
lines changed

1 file changed

+57
-1
lines changed

Dockerfile.amd64

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,65 @@ COPY rootfs /
113113
RUN ln -sf /usr/local/lib/web/frontend/static/websockify /usr/local/lib/web/frontend/static/novnc/utils/websockify && \
114114
chmod +x /usr/local/lib/web/frontend/static/websockify/run
115115

116+
#Install dependencies
117+
RUN apt-get update && \
118+
apt-get install -y git wget python3.6 python3.6-dev \
119+
python3-pip virtualenv \
120+
xvfb build-essential libssl-dev libffi-dev sudo apt-utils unzip nano
121+
122+
# use host machine ssh pub and prv keys for git.tazi.io
123+
ARG ssh_prv_key
124+
ARG ssh_pub_key
125+
RUN mkdir -p /root/.ssh
126+
RUN echo "$ssh_prv_key" > /root/.ssh/id_rsa && \
127+
echo "$ssh_pub_key" > /root/.ssh/id_rsa.pub && \
128+
chmod 600 /root/.ssh/id_rsa && \
129+
chmod 600 /root/.ssh/id_rsa.pub
130+
RUN ssh-keyscan git.tazi.io >> /root/.ssh/known_hosts
131+
132+
# add user and group for google chrome
133+
# RUN groupadd -g 2000 automation
134+
# RUN useradd -rm -d "/home/automation" -s /bin/bash -g automation -G automation -u 1000 automation
135+
# RUN echo automation:1234 | chpasswd
136+
# RUN passwd -u automation
137+
# RUN echo automation:automation | chpasswd
138+
# RUN echo "automation ALL=(ALL) NOPASSWD:ALL">>/etc/sudoers
139+
140+
141+
# Set work directory
142+
WORKDIR /home/automation/
143+
# Get Google Chrome deb package and install google-chrome
144+
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -P /home/automation/
145+
RUN dpkg -i /home/automation/google-chrome-stable_current_amd64.deb; apt-get -fy install
146+
147+
# Clone repository
148+
RUN git clone --single-branch --branch develop_intern git@git.tazi.io:tazi_deploy/automation-test-scenarios-kantu.git /home/automation/app
149+
150+
# Get Kantu-XModules
151+
RUN wget -O kantu_xmodules.zip http://download.ui.vision/x/ui.vision-xmodules-linux-v201908.zip -P /home/automation/
152+
# Unzip xmodules.zip and move zip file into folder
153+
RUN unzip /home/automation/kantu_xmodules.zip -d /home/automation/kantu_xmodules
154+
RUN mkdir -p /home/automation/kantu_xmodules/macros/
155+
RUN mv /home/automation/kantu_xmodules.zip /home/automation/kantu_xmodules/
156+
157+
158+
#mv chrome config to root config
159+
RUN mkdir -p /root/Downloads
160+
#RUN mkdir -p /home/automation/Downloads
161+
RUN mkdir -p /home/automation/.config/google-chrome
162+
RUN mv /home/automation/app/google-chrome /root/.config/
163+
RUN mkdir -p /home/automation/app/htmls
164+
RUN rm -rf /root/.config/google-chrome/Singleton*
165+
RUN /bin/bash -c "chmod +x -R /home/automation/kantu_xmodules/"
166+
RUN bash /home/automation/kantu_xmodules/1install.sh
167+
RUN mv /home/automation/app/marketing_train.csv /home/automation/
168+
RUN mv /home/automation/app/custchurn_20k.csv /home/automation/
169+
RUN /bin/bash -c "pip3 install -r /home/automation/app/kantu-tazi/requirements.txt"
170+
RUN rm -rf /root/.ssh/
171+
EXPOSE 25000
116172
EXPOSE 80
117173
WORKDIR /root
118-
ENV HOME=/home/ubuntu \
174+
ENV HOME=/home/automation \
119175
SHELL=/bin/bash
120176
HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://127.0.0.1:6079/api/health
121177
ENTRYPOINT ["/startup.sh"]

0 commit comments

Comments
 (0)