|
| 1 | +FROM openwhisk/action-python-v3.9:d1c3d3f |
| 2 | + |
| 3 | +COPY requirements.txt requirements.txt |
| 4 | + |
| 5 | +RUN apt-get update \ |
| 6 | + # Upgrade installed packages to get latest security fixes if the base image does not contain them already. |
| 7 | + && apt-get upgrade -y --no-install-recommends \ |
| 8 | + # cleanup package lists, they are not used anymore in this image |
| 9 | + && rm -rf /var/lib/apt/lists/* \ |
| 10 | + # We do not have mysql-server installed but mysql-common contains config files (/etc/mysql/my.cnf) for it. |
| 11 | + # We need to add some dummy entries to /etc/mysql/my.cnf to sattisfy vulnerability checking of it. |
| 12 | + && echo "\n[mysqld]\nssl-ca=/tmp/ca.pem\nssl-cert=/tmp/server-cert.pem\nssl-key=/tmp/server-key.pem\n" >> /etc/mysql/my.cnf \ |
| 13 | + # install additional python modules |
| 14 | + # we pin setuptools==57.5.0, reason is that ibm_db<=3.0.4 requires 'use_2to3' during install which has been |
| 15 | + # removed from setuptools starting with the 58.x.x release. The install therefore fails with: |
| 16 | + # error in ibm_db setup command: use_2to3 is invalid. |
| 17 | + # When ibm_db is upgraded to a version that does not need 'use_2to3' anymore the pin can also be removed. |
| 18 | + && pip install --upgrade pip \ |
| 19 | + && pip install --no-cache-dir -r requirements.txt \ |
| 20 | + # Show actual python version in the build output. |
| 21 | + && echo "Actual python version is:" \ |
| 22 | + && python --version \ |
| 23 | + # Show actual /bin/proxy version in the build output, makes it easier to check if go security fixes need to be applied. |
| 24 | + && echo "Actual /bin/proxy version is:" \ |
| 25 | + && /bin/proxy -version |
0 commit comments