github.com/apache/beam/sdks/v2@v2.48.2/java/container/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  ARG java_version
    19  FROM eclipse-temurin:${java_version}
    20  LABEL Author "Apache Beam <dev@beam.apache.org>"
    21  ARG TARGETOS
    22  ARG TARGETARCH
    23  
    24  ARG pull_licenses
    25  
    26  ADD target/slf4j-api.jar /opt/apache/beam/jars/
    27  ADD target/slf4j-jdk14.jar /opt/apache/beam/jars/
    28  ADD target/jcl-over-slf4j.jar /opt/apache/beam/jars/
    29  ADD target/log4j-over-slf4j.jar /opt/apache/beam/jars/
    30  ADD target/log4j-to-slf4j.jar /opt/apache/beam/jars/
    31  ADD target/beam-sdks-java-harness.jar /opt/apache/beam/jars/
    32  
    33  # Required to use jamm as a javaagent to get accurate object size measuring
    34  # COPY fails if file is not found, so use a wildcard for open-module-agent.jar
    35  # since it is only included in Java 9+ containers
    36  COPY target/jamm.jar target/open-module-agent*.jar /opt/apache/beam/jars/
    37  
    38  COPY target/${TARGETOS}_${TARGETARCH}/boot /opt/apache/beam/
    39  
    40  COPY target/LICENSE /opt/apache/beam/
    41  COPY target/NOTICE /opt/apache/beam/
    42  
    43  # copy third party licenses
    44  ADD target/third_party_licenses /opt/apache/beam/third_party_licenses/
    45  
    46  # Copy Java options. Because the options directory may be empty and
    47  # COPY fails if there are no files, copy an extra LICENSE file then remove it.
    48  COPY target/LICENSE target/options/* /opt/apache/beam/options/
    49  
    50  # Add golang licenses.
    51  COPY target/go-licenses/* /opt/apache/beam/third_party_licenses/golang/
    52  RUN if [ "${pull_licenses}" = "false" ] ; then \
    53      # Remove above license dir if pull licenses false
    54      rm -rf /opt/apache/beam/third_party_licenses ; \
    55     fi
    56  
    57  # Add Google Cloud Profiler agent.
    58  COPY target/profiler/* /opt/google_cloud_profiler/
    59  
    60  ENTRYPOINT ["/opt/apache/beam/boot"]