-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (30 loc) · 1.06 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
FROM python:3.6
LABEL maintainer Anton Pegov <github.com/antonpegov>
LABEL description Robot Framework with LambdaTest running on Docker
# Set environment variables
ENV ROBOT_RESOURCES_DIR /robot/resources
ENV ROBOT_TESTS_DIR /robot/tests
ENV ROBOT_WORK_DIR /robot
ENV ROBOT_LOGS_DIR /robot/logs
# Create directories
RUN mkdir -p ${ROBOT_RESOURCES_DIR}
RUN mkdir -p ${ROBOT_TESTS_DIR}
RUN mkdir -p ${ROBOT_WORK_DIR}
RUN mkdir -p ${ROBOT_LOGS_DIR}
# Copy the tests to the tests directory
COPY ./tests ${ROBOT_TESTS_DIR}
COPY ./resources ${ROBOT_RESOURCES_DIR}
COPY requirements.txt ${ROBOT_WORK_DIR}/requirements.txt
COPY Makefile ${ROBOT_WORK_DIR}/Makefile
COPY make.exe ${ROBOT_WORK_DIR}/make.exe
COPY run.sh ${ROBOT_WORK_DIR}/run.sh
RUN chmod +x ${ROBOT_WORK_DIR}/run.sh
# A dedicated work folder to allow for the creation of temporary files
WORKDIR ${ROBOT_WORK_DIR}
# Install Robot Framework and dependencies
RUN python3 -m pip install virtualenv
RUN virtualenv venv
RUN . venv/bin/activate
RUN python3 -m pip install -r requirements.txt
# Execute tests
ENTRYPOINT ["./run.sh"]