@@ -52,6 +52,17 @@ RUN ./configure \
5252RUN make
5353RUN make install
5454
55+ FROM build-deps AS build-nassl
56+
57+ COPY vendor/nassl6 /src/vendor/nassl
58+ WORKDIR /src/vendor/nassl
59+
60+ RUN ln -s /usr/bin/python3 /usr/bin/python
61+
62+ RUN pip3 install -r requirements-dev.txt
63+ RUN invoke build.all
64+ RUN python3 setup.py install
65+
5566# intermediate stage with apt and python dependencies
5667FROM build-deps AS build-app-deps
5768
@@ -60,6 +71,10 @@ COPY requirements.txt /src/
6071WORKDIR /src
6172
6273RUN pip3 install --system -r requirements.txt
74+ # sslyze is installed from our own fork, and installed
75+ # without deps to avoid it trying to install nassl, when
76+ # we have our custom nassl
77+ RUN pip3 install --no-deps sslyze
6378
6479# stage with app dependencies and lint/test depencencies
6580FROM build-app-deps AS linttest-deps
@@ -146,6 +161,9 @@ RUN apt update && \
146161COPY --from=build-unbound /opt/unbound /opt/unbound
147162COPY --from=build-unbound /usr/lib/python3/dist-packages/*unbound* /usr/lib/python3/dist-packages/
148163
164+ # copy nassl Python module into image
165+ COPY --from=build-nassl /usr/local/lib/python${PYTHON_VERSION}/dist-packages/nassl-*.egg /usr/local/lib/python${PYTHON_VERSION}/dist-packages/
166+
149167# copy application dependencies into image
150168COPY --from=build-app-deps /usr/local/lib/python${PYTHON_VERSION}/dist-packages/ /usr/local/lib/python${PYTHON_VERSION}/dist-packages/
151169COPY --from=build-app-deps /usr/local/bin/* /usr/local/bin/
0 commit comments