Fix Sonobuoy systemd-image for k8 1.18
[validation.git] / docker / openstack / 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 ARG REFSTACK_TARGET=2019.11
21
22 # Install dependencies
23 COPY pip-requirements.txt /wheels/requirements/pip-requirements.txt
24
25 RUN apk --no-cache add --update \
26         bash \
27         build-base \
28         cairo \
29         cairo-dev \
30         cargo \
31         curl \
32         findutils \
33         freetype-dev \
34         gcc \
35         gdk-pixbuf-dev \
36         gettext \
37         git \
38         grep \
39         jpeg-dev \
40         lcms2-dev \
41         libc-dev \
42         libffi-dev \
43         make \
44         musl-dev \
45         openjpeg-dev \
46         openssl-dev \
47         pango-dev \
48         poppler-utils \
49         postgresql-client \
50         postgresql-dev \
51         py-cffi \
52         python3-dev \
53         py3-pip \
54         rsync \
55         rust \
56         tcl-dev \
57         tiff-dev \
58         tk-dev \
59         wget \
60         zlib-dev
61
62 # Build binaries
63 WORKDIR /wheels
64 RUN pip3 install wheel
65 RUN pip3 wheel -r /wheels/requirements/pip-requirements.txt
66 RUN git clone https://gerrit.akraino.org/r/validation /opt/akraino/validation
67 RUN wget -q -O /tmp/test_list.txt \
68     "https://refstack.openstack.org/api/v1/guidelines/$REFSTACK_TARGET/tests?target=platform&type=required&alias=true&flag=false"
69
70 # Copy binaries in the final container and install requirements
71 FROM python:3.10.0b1-alpine3.13
72 COPY --from=build /wheels /wheels
73 COPY --from=build /opt/akraino/validation /opt/akraino/validation
74 COPY --from=build /tmp/test_list.txt /opt/akraino/validation/tests/openstack/tempest/test_list.txt
75
76 RUN apk --no-cache add --update \
77         bash \
78         build-base \
79         cairo \
80         cairo-dev \
81         cargo \
82         curl \
83         findutils \
84         freetype-dev \
85         gcc \
86         gdk-pixbuf-dev \
87         gettext \
88         git \
89         grep \
90         jpeg-dev \
91         lcms2-dev \
92         libc-dev \
93         libffi-dev \
94         make \
95         musl-dev \
96         openjpeg-dev \
97         openssl-dev \
98         pango-dev \
99         poppler-utils \
100         postgresql-client \
101         postgresql-dev \
102         py-cffi \
103         python3-dev \
104         py3-pip \
105         rsync \
106         rust \
107         tcl-dev \
108         tiff-dev \
109         tk-dev \
110         wget \
111         zlib-dev
112
113 RUN pip3 install -r /wheels/requirements/pip-requirements.txt \
114                  -f /wheels && \
115      rm -rf /wheels && \
116      rm -rf /root/.cache/pip/*
117
118 # Install blueval dependencies
119 RUN pip install -r /opt/akraino/validation/bluval/requirements.txt