github.com/apache/beam/sdks/v2@v2.48.2/python/apache_beam/io/azure/integration_test/Dockerfile (about) 1 ############################################################################### 2 # Licensed to the Apache Software Foundation (ASF) under one 3 # or more contributor license agreements. See the NOTICE file 4 # distributed with this work for additional information 5 # regarding copyright ownership. The ASF licenses this file 6 # to you under the Apache License, Version 2.0 (the 7 # "License"); you may not use this file except in compliance 8 # with the License. You may obtain a copy of the License at 9 # 10 # http://www.apache.org/licenses/LICENSE-2.0 11 # 12 # Unless required by applicable law or agreed to in writing, software 13 # distributed under the License is distributed on an "AS IS" BASIS, 14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 # See the License for the specific language governing permissions and 16 # limitations under the License. 17 ############################################################################### 18 19 # This image contains a Python SDK build and dependencies. 20 # By default it runs wordcount against a locally accessible Azurite service. 21 # See azure_integration_test.sh for example usage. 22 ARG BASE_IMAGE 23 FROM $BASE_IMAGE 24 25 # Install Azure CLI. 26 RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash 27 28 WORKDIR /app 29 30 # Add Beam SDK sources. 31 COPY sdks/python /app/sdks/python 32 COPY model /app/model 33 34 # This step should look like setupVirtualenv minus virtualenv creation. 35 RUN pip install --no-cache-dir tox==3.11.1 -r sdks/python/build-requirements.txt 36 37 # Add Azurite's self-signed cert to the global CA cert store. 38 COPY cert.pem /usr/local/share/ca-certificates/azurite.crt 39 RUN update-ca-certificates 40 41 # Tell python to use the global CA cert store. 42 # See https://stackoverflow.com/a/66494735 43 ENV REQUESTS_CA_BUNDLE /etc/ssl/certs/ca-certificates.crt 44 45 # Run wordcount, and write results to Azurite. 46 CMD cd sdks/python && tox -e azure_integration_test