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.10.0b1-alpine3.13 as build
20 ARG REFSTACK_TARGET=2019.11
22 # Install dependencies
23 COPY pip-requirements.txt /wheels/requirements/pip-requirements.txt
25 RUN apk --no-cache add --update \
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"
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
76 RUN apk --no-cache add --update \
113 RUN pip3 install -r /wheels/requirements/pip-requirements.txt \
116 rm -rf /root/.cache/pip/*
118 # Install blueval dependencies
119 RUN pip install -r /opt/akraino/validation/bluval/requirements.txt