-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathrobot_framework_dockerfile
More file actions
executable file
·54 lines (45 loc) · 2.36 KB
/
robot_framework_dockerfile
File metadata and controls
executable file
·54 lines (45 loc) · 2.36 KB
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
#Copyright 2016 Symbio sakari.hoisko@symbio.com
#Copyright 2016 miyo@eficode.com
#Copyright 2016 Eficode sakari.hoisko@eficode.com
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
#http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable law or agreed to in writing, software
#distributed under the License is distributed on an "AS IS" BASIS,
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#See the License for the specific language governing permissions and
#limitations under the License.
FROM debian
# In case you need proxy
#RUN echo 'Acquire::http::Proxy "http://127.0.0.1:8080";' >> /etc/apt/apt.conf
# Upgrade packages and install SSH server
RUN apt-get -q update &&\
DEBIAN_FRONTEND="noninteractive" apt-get -q upgrade -y -o Dpkg::Options::="--force-confnew" --no-install-recommends &&\
DEBIAN_FRONTEND="noninteractive" apt-get -q install -y -o Dpkg::Options::="--force-confnew" --no-install-recommends openssh-server &&\
apt-get -q autoremove &&\
apt-get -q clean -y && rm -rf /var/lib/apt/lists/* && rm -f /var/cache/apt/*.bin &&\
sed -i 's|session required pam_loginuid.so|session optional pam_loginuid.so|g' /etc/pam.d/sshd &&\
mkdir -p /var/run/sshd
# Install deps
# RIDE installation requires python-wxgtk2.8 which can be installed from wheezy repo
RUN echo "deb http://ftp.seclan.com/debian/ wheezy main" >> /etc/apt/sources.list && \
echo "deb-src http://ftp.seclan.com/debian/ wheezy main" >> /etc/apt/sources.list &&\
apt-get -q update &&\
DEBIAN_FRONTEND="noninteractive" apt-get -q install -y -o Dpkg::Options::="--force-confnew" --no-install-recommends openjdk-7-jre python2.7 python-pip python-wxgtk2.8 python-pycryptopp python-paramiko xauth &&\
apt-get -q clean -y && rm -rf /var/lib/apt/lists/* && rm -f /var/cache/apt/*.bin
# Robot framework and RIDE installation:
RUN pip install robotframework robotframework-ride robotframework-sshlibrary robotframework-pabot
#Set default container SSH user
ENV SSHUSER=sshuser \
SSHUSERPW=sshuserpw \
SSHUSERKEY=""
#Add script to container some handle SSH user addition and SSH server
COPY rfw_df_entrypoint.sh /
RUN chmod 755 /rfw_df_entrypoint.sh
# Expose SSH
EXPOSE 22
ENTRYPOINT ["/rfw_df_entrypoint.sh"]