-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable Java SDK Distroless container image variants. (#33173)
* Enable Java SDK Distroless container image variant * Add LANG environment and /usr/lib/locale * Use examples tests instead
- Loading branch information
1 parent
d342dd3
commit 09c1c9e
Showing
4 changed files
with
110 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
{} | ||
{ | ||
"comment": "Modify this file in a trivial way to cause this test suite to run", | ||
"modification": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"comment": "Modify this file in a trivial way to cause this test suite to run", | ||
"modification": 1 | ||
"modification": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
############################################################################### | ||
# 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. | ||
############################################################################### | ||
|
||
# ARG BEAM_BASE is the Beam SDK container image built using sdks/python/container/Dockerfile. | ||
ARG BEAM_BASE | ||
|
||
# ARG DISTROLESS_BASE is the distroless container image URL. For available distroless Java images, | ||
# see https://github.com/GoogleContainerTools/distroless/tree/main?tab=readme-ov-file#what-images-are-available. | ||
# Only Java versions 17 and 21 are supported. | ||
ARG DISTROLESS_BASE | ||
FROM ${BEAM_BASE} AS base | ||
ARG TARGETARCH | ||
ENV LANG C.UTF-8 | ||
|
||
LABEL Author="Apache Beam <[email protected]>" | ||
|
||
RUN if [ -z "${TARGETARCH}" ]; then echo "fatal: TARGETARCH not set; run as docker buildx build or use --build-arg=TARGETARCH=amd64|arm64" >&2; exit 1; fi | ||
|
||
FROM ${DISTROLESS_BASE}:latest-${TARGETARCH} AS distroless | ||
|
||
COPY --from=base /opt /opt | ||
|
||
# Along with the LANG environment variable above, prevents internally discovered failing bugs related to Dataflow Flex | ||
# template character encodings. | ||
COPY --from=base /usr/lib/locale /usr/lib/locale | ||
|
||
ENTRYPOINT ["/opt/apache/beam/boot"] |