Fix Sonobuoy systemd-image for k8 1.18
[validation.git] / docker / hardware / Dockerfile
1 ##############################################################################
2 # Copyright (c) 2019 AT&T, ENEA AB, Nokia and others                         #
3 #                                                                            #
4 # Licensed under the Apache License, Version 2.0 (the "License");            #
5 # you maynot use this file except in compliance with the License.            #
6 #                                                                            #
7 # You may obtain a copy of the License at                                    #
8 #       http://www.apache.org/licenses/LICENSE-2.0                           #
9 #                                                                            #
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 ##############################################################################
16
17 # ref: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#use-multi-stage-builds
18 FROM python:3.10.0b1-alpine3.13 as build
19
20 # Install dependencies
21 COPY pip-requirements.txt /wheels/requirements/pip-requirements.txt
22
23 RUN apk --no-cache add --update \
24         build-base \
25         cairo \
26         cairo-dev \
27         cargo \
28         freetype-dev \
29         gcc \
30         gdk-pixbuf-dev \
31         gettext \
32         git \
33         jpeg-dev \
34         lcms2-dev \
35         libffi-dev \
36         musl-dev \
37         openjpeg-dev \
38         openssl-dev \
39         pango-dev \
40         poppler-utils \
41         postgresql-client \
42         postgresql-dev \
43         py-cffi \
44         python3-dev \
45         rust \
46         tcl-dev \
47         tiff-dev \
48         tk-dev \
49         zlib-dev
50
51 # Build binaries
52 WORKDIR /wheels
53 RUN pip3 install wheel
54 RUN pip3 wheel -r /wheels/requirements/pip-requirements.txt
55 RUN git clone https://gerrit.akraino.org/r/validation /opt/akraino/validation
56
57 RUN wget -qO- https://github.com/DMTF/Redfish-Test-Framework/archive/master.zip | \
58     unzip -qd /opt/akraino -
59 RUN wget -qO- https://github.com/DMTF/Redfish-Usecase-Checkers/archive/master.zip | \
60     unzip -qd /opt/akraino -
61
62 # Copy binaries in the final contaier and install robot framework
63 FROM python:3.10.0b1-alpine3.13
64 COPY --from=build /wheels /wheels
65 COPY --from=build /opt/akraino/validation /opt/akraino/validation
66 COPY --from=build /opt/akraino/Redfish-Test-Framework-master /opt/akraino/Redfish-Test-Framework
67 COPY --from=build /opt/akraino/Redfish-Usecase-Checkers-master /opt/akraino/Redfish-Usecase-Checkers
68
69 RUN apk --no-cache add --update \
70         build-base \
71         cairo \
72         cairo-dev \
73         cargo \
74         curl \
75         freetype-dev \
76         gcc \
77         gdk-pixbuf-dev \
78         gettext \
79         git \
80         jpeg-dev \
81         lcms2-dev \
82         libffi-dev \
83         musl-dev \
84         openjpeg-dev \
85         openssl-dev \
86         pango-dev \
87         poppler-utils \
88         postgresql-client \
89         postgresql-dev \
90         py-cffi \
91         python3-dev \
92         rust \
93         tcl-dev \
94         tiff-dev \
95         tk-dev \
96         zlib-dev
97
98 RUN pip3 install -r /wheels/requirements/pip-requirements.txt \
99                  -f /wheels && \
100      rm -rf /wheels && \
101      rm -rf /root/.cache/pip/*
102
103 # Install blueval dependencies
104 RUN pip install -r /opt/akraino/validation/bluval/requirements.txt
105
106 # Install Redfish dependencies
107 RUN pip install html-testRunner \
108                 -r /opt/akraino/Redfish-Usecase-Checkers/requirements.txt
109