bvolpato commented on code in PR #27006:
URL: https://github.com/apache/beam/pull/27006#discussion_r1215039055


##########
sdks/python/container/Dockerfile:
##########
@@ -22,8 +22,20 @@ LABEL Author "Apache Beam <[email protected]>"
 ARG TARGETOS
 ARG TARGETARCH
 
-# Install native bindings required for dependencies.
-RUN apt-get update && \
+COPY target/base_image_requirements.txt /tmp/base_image_requirements.txt
+COPY target/apache-beam.tar.gz /opt/apache/beam/tars/
+COPY target/LICENSE /opt/apache/beam/
+COPY target/LICENSE.python /opt/apache/beam/
+COPY target/NOTICE /opt/apache/beam/
+COPY target/launcher/${TARGETOS}_${TARGETARCH}/boot /opt/apache/beam/

Review Comment:
   Great improvement!
   
   Isn't every COPY a new layer? We can probably consolidate it as well.
   
   
   > COPY target/LICENSE target/LICENSE.python target/NOTICE 
target/launcher/${TARGETOS}_${TARGETARCH}/boot /opt/apache/beam/
   
   



##########
sdks/python/container/Dockerfile:
##########
@@ -22,8 +22,20 @@ LABEL Author "Apache Beam <[email protected]>"
 ARG TARGETOS
 ARG TARGETARCH
 
-# Install native bindings required for dependencies.
-RUN apt-get update && \
+COPY target/base_image_requirements.txt /tmp/base_image_requirements.txt
+COPY target/apache-beam.tar.gz /opt/apache/beam/tars/
+COPY target/LICENSE /opt/apache/beam/
+COPY target/LICENSE.python /opt/apache/beam/
+COPY target/NOTICE /opt/apache/beam/
+COPY target/launcher/${TARGETOS}_${TARGETARCH}/boot /opt/apache/beam/

Review Comment:
   Great improvement!
   
   Isn't every COPY a new layer? We can probably consolidate the ones that go 
to the same dest folder as well.
   
   
   > COPY target/LICENSE target/LICENSE.python target/NOTICE 
target/launcher/${TARGETOS}_${TARGETARCH}/boot /opt/apache/beam/
   
   
   



-- 
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]

Reply via email to