Fix Sonobuoy systemd-image for k8 1.18
[validation.git] / docker / helm / 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 HELM_TAG=v2.15.1
21
22 # Install dependencies
23 COPY pip-requirements.txt /wheels/requirements/pip-requirements.txt
24 RUN apk --no-cache add --update \
25         build-base \
26         cairo \
27         cairo-dev \
28         cargo \
29         freetype-dev \
30         gcc \
31         gdk-pixbuf-dev \
32         gettext \
33         git \
34         jpeg-dev \
35         lcms2-dev \
36         libffi-dev \
37         musl-dev \
38         openjpeg-dev \
39         openssl-dev \
40         pango-dev \
41         poppler-utils \
42         postgresql-client \
43         postgresql-dev \
44         py-cffi \
45         python3-dev \
46         rust \
47         tcl-dev \
48         tiff-dev \
49         tk-dev \
50         zlib-dev
51
52 # Build binaries
53 WORKDIR /wheels
54 RUN pip3 install wheel
55 RUN pip3 wheel -r /wheels/requirements/pip-requirements.txt
56 RUN git clone https://gerrit.akraino.org/r/validation /opt/akraino/validation
57 RUN git clone -b $HELM_TAG https://github.com/helm/helm.git /opt/helm
58
59 # Copy binaries in the final container and install requirements
60 FROM python:3.10.0b1-alpine3.13
61 COPY --from=build /wheels /wheels
62 COPY --from=build /opt/akraino/validation /opt/akraino/validation
63 COPY --from=build /opt/helm/docs/examples/alpine /opt/akraino/bluval-test-alpine
64
65 RUN apk --no-cache add --update \
66         build-base \
67         cairo \
68         cairo-dev \
69         cargo \
70         freetype-dev \
71         gcc \
72         gdk-pixbuf-dev \
73         gettext \
74         git \
75         jpeg-dev \
76         lcms2-dev \
77         libffi-dev \
78         musl-dev \
79         openjpeg-dev \
80         openssl-dev \
81         pango-dev \
82         poppler-utils \
83         postgresql-client \
84         postgresql-dev \
85         py-cffi \
86         python3-dev \
87         rust \
88         tcl-dev \
89         tiff-dev \
90         tk-dev \
91         zlib-dev
92
93 RUN pip3 install -r /wheels/requirements/pip-requirements.txt \
94                  -f /wheels && \
95      rm -rf /wheels && \
96      rm -rf /root/.cache/pip/*
97
98 # Install blueval dependencies
99 RUN pip install -r /opt/akraino/validation/bluval/requirements.txt