1 ##############################################################################
2 # Copyright (c) 2019 AT&T, ENEA AB, Nokia and others #
4 # Licensed under the Apache License, Version 2.0 (the "License"); #
5 # you maynot use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
8 # http://www.apache.org/licenses/LICENSE-2.0 #
10 # Unless required by applicable law or agreed to in writing, software #
11 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
12 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
13 # See the License for the specific language governing permissions and #
14 # limitations under the License. #
15 ##############################################################################
17 # ref: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#use-multi-stage-builds
18 FROM python:3.6-alpine3.9 as build
20 # Install dependencies
21 COPY pip-requirements.txt /wheels/requirements/pip-requirements.txt
23 RUN apk --no-cache add --update \
35 RUN pip3 install wheel
36 RUN pip3 wheel -r /wheels/requirements/pip-requirements.txt
37 RUN git clone https://gerrit.akraino.org/r/validation /opt/akraino/validation
39 RUN wget -qO- https://github.com/DMTF/Redfish-Test-Framework/archive/master.zip | \
40 unzip -qd /opt/akraino -
41 RUN wget -qO- https://github.com/DMTF/Redfish-Usecase-Checkers/archive/master.zip | \
42 unzip -qd /opt/akraino -
44 # Copy binaries in the final contaier and install robot framework
45 FROM python:3.6-alpine3.9
46 COPY --from=build /wheels /wheels
47 COPY --from=build /opt/akraino/validation /opt/akraino/validation
48 COPY --from=build /opt/akraino/Redfish-Test-Framework-master /opt/akraino/Redfish-Test-Framework
49 COPY --from=build /opt/akraino/Redfish-Usecase-Checkers-master /opt/akraino/Redfish-Usecase-Checkers
51 RUN pip3 install -r /wheels/requirements/pip-requirements.txt \
54 rm -rf /root/.cache/pip/*
56 # Install blueval dependencies
57 RUN pip install -r /opt/akraino/validation/bluval/requirements.txt
59 # Install Redfish dependencies
60 RUN pip install html-testRunner \
61 -r /opt/akraino/Redfish-Usecase-Checkers/requirements.txt
64 RUN apk --no-cache add --update \