Jmennius commented on code in PR #1550:
URL: https://github.com/apache/qpid-dispatch/pull/1550#discussion_r847227410


##########
dockerfiles/Dockerfile-debian:
##########
@@ -0,0 +1,79 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+FROM debian:bullseye-slim AS build
+
+LABEL org.opencontainers.image.authors="[email protected]"
+
+# UPGRADE: proton > 0.37.0: replace `python3/dist-packages` with 
`python3.9/site-packages/`
+ARG proton_version=0.37.0
+ARG dispatch_version=1.19.0
+ARG enable_console=OFF
+
+
+ENV DEBIAN_FRONTEND=noninteractive
+
+RUN apt-get update && \
+    apt-get install -y --no-install-recommends build-essential cmake 
pkg-config git ninja-build ca-certificates \
+        libssl-dev libsasl2-dev libuv1-dev swig python3-dev libwebsockets-dev 
npm && \
+    rm -rf /var/lib/apt/lists/*
+
+RUN git clone --depth 1 -b ${dispatch_version} 
https://gitbox.apache.org/repos/asf/qpid-dispatch.git && \
+       git clone --depth 1 -b ${proton_version} 
https://gitbox.apache.org/repos/asf/qpid-proton.git
+
+# build and install into system for laster usage by dispatch, but also install 
discretely so that it's easier to copy
+RUN mkdir /qpid-proton/build /qpid-proton/install-prefix && cd 
/qpid-proton/build && \
+       cmake .. -GNinja -DPROACTOR=libuv -DSYSINSTALL_BINDINGS=ON 
-DCMAKE_INSTALL_PREFIX=/usr -DSYSINSTALL_PYTHON=ON && \
+       cmake --build . --target install && \
+       cmake --install . --prefix /qpid-proton/install-prefix
+
+RUN mkdir /qpid-dispatch/build /qpid-dispatch/install-prefix && cd 
/qpid-dispatch/build && \
+       cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DUSE_VALGRIND=NO 
-DCONSOLE_INSTALL=${enable_console} && \
+       cmake --build . && \
+       cmake --install . --prefix /qpid-dispatch/install-prefix
+
+# Uncomment the following line if you would like to run all the dispatch unit 
tests and system tests
+#RUN cd /qpid-dispatch/build && ctest -VV
+
+FROM debian:bullseye-slim
+
+# proton
+COPY --from=build /qpid-proton/install-prefix /usr/
+# python packages
+COPY --from=build /usr/lib/python3/dist-packages/proton 
/usr/lib/python3/dist-packages/proton
+COPY --from=build /usr/lib/python3/dist-packages/cproton.py 
/usr/lib/python3/dist-packages/_cproton.so \
+       /usr/lib/python3/dist-packages/
+
+# qpid-dispatch
+COPY --from=build /qpid-dispatch/install-prefix /usr/
+# leftovers that are not so compliant with prefix, at least with how we 
manipulate it
+COPY --from=build /etc/qpid-dispatch /etc/qpid-dispatch
+COPY --from=build /usr/share/qpid-dispatch /usr/share/qpid-dispatch
+COPY --from=build /etc/sasl2 /etc/sasl2
+COPY --from=build /usr/lib/python3.9/site-packages/qpid_dispatch 
/usr/lib/python3.9/site-packages/qpid_dispatch
+COPY --from=build /usr/lib/python3.9/site-packages/qpid_dispatch_site.py 
/usr/lib/python3.9/site-packages/
+
+RUN apt-get update && \
+    apt-get install -y --no-install-recommends libsasl2-2 libsasl2-modules 
libuv1 python3 libpython3.9 libwebsockets16 && \
+    rm -rf /var/lib/apt/lists/*

Review Comment:
   It probably is, I will change it. (I will also include `ca-certificates` in 
the final image)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to