[UI] Optional trust of all SSL Certificates
[validation.git] / docker / docker / 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.6-alpine3.9 as build
19
20 # Install dependencies
21 COPY pip-requirements.txt /wheels/requirements/pip-requirements.txt
22 RUN apk --no-cache add --update \
23         gcc \
24         git \
25         libc-dev \
26         libffi \
27         libffi-dev \
28         make \
29         openssl-dev
30
31 # Build binaries
32 WORKDIR /wheels
33 RUN pip3 install wheel
34 RUN pip3 wheel -r /wheels/requirements/pip-requirements.txt
35 RUN git clone https://gerrit.akraino.org/r/validation /opt/akraino/validation
36 RUN git clone https://github.com/docker/docker-bench-security.git /opt/akraino/docker-bench-security
37
38 # Copy binaries in the final container and install requirements
39 FROM python:3.6-alpine3.9
40 COPY --from=build /wheels /wheels
41 COPY --from=build /opt/akraino/validation /opt/akraino/validation
42 COPY --from=build /opt/akraino/docker-bench-security /opt/akraino/docker-bench-security
43
44 RUN pip3 install -r /wheels/requirements/pip-requirements.txt \
45                  -f /wheels && \
46      rm -rf /wheels && \
47      rm -rf /root/.cache/pip/*
48
49 # Install blueval dependencies
50 RUN pip install -r /opt/akraino/validation/bluval/requirements.txt