TaiJuWu created KAFKA-18534:
-------------------------------
Summary: docker build fail because log4j
Key: KAFKA-18534
URL: https://issues.apache.org/jira/browse/KAFKA-18534
Project: Kafka
Issue Type: Bug
Reporter: TaiJuWu
Assignee: TaiJuWu
cmd:
python docker_build_test.py kafka/test --image-tag=3.8.0 --image-type=native
--kafka-url=https://archive.apache.org/dist/kafka/3.8.0/kafka_2.13-3.8.0.tgz
The error throw
```
=> [build-native-image 5/5] RUN mkdir /app/kafka; microdnf install wget;
wget -nv -O kafka.tgz
"https://archive.apache.org/dist/kafka/3.8.0/kafka_2.13-3.8.0.tgz"; wget
-nv -O kafka.tgz.asc
"https://archive.apache.org/dist/kafka/3.8.0/kafka_2.13-3.8.0 107.3s
=> CACHED [stage-1 3/8] COPY --chown=appuser:root --from=build-native-image
/app/kafka/kafka.Kafka /opt/kafka/
0.0s
=> ERROR [stage-1 4/8] COPY --chown=appuser:root --from=build-native-image
/app/kafka/config/kraft/reconfig-server.properties /etc/kafka/docker/
0.0s
=> ERROR [stage-1 5/8] COPY --chown=appuser:root --from=build-native-image
/app/kafka/config/log4j2.yaml /etc/kafka/docker/
0.0s
=> ERROR [stage-1 6/8] COPY --chown=appuser:root --from=build-native-image
/app/kafka/config/tools-log4j2.yaml /etc/kafka/docker/
0.0s
------
> [stage-1 4/8] COPY --chown=appuser:root --from=build-native-image
/app/kafka/config/kraft/reconfig-server.properties /etc/kafka/docker/:
------
------
> [stage-1 5/8] COPY --chown=appuser:root --from=build-native-image
/app/kafka/config/log4j2.yaml /etc/kafka/docker/:
------
------
> [stage-1 6/8] COPY --chown=appuser:root --from=build-native-image
/app/kafka/config/tools-log4j2.yaml /etc/kafka/docker/:
------
Dockerfile:68
--------------------
66 | COPY --chown=appuser:root --from=build-native-image
/app/kafka/config/kraft/reconfig-server.properties /etc/kafka/docker/
67 | COPY --chown=appuser:root --from=build-native-image
/app/kafka/config/log4j2.yaml /etc/kafka/docker/
68 | >>> COPY --chown=appuser:root --from=build-native-image
/app/kafka/config/tools-log4j2.yaml /etc/kafka/docker/
69 | COPY --chown=appuser:root resources/common-scripts /etc/kafka/docker/
70 | COPY --chown=appuser:root launch /etc/kafka/docker/
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate
checksum of ref
e873af20-6895-4203-a36b-f2e96f726025::nmrt29mmksjf1mty1yveutk0q:
"/app/kafka/config/tools-log4j2.yaml": not found
Traceback (most recent call last):
File "/home/tjwu/kafka/docker/common.py", line 42, in
build_docker_image_runner
execute(command.split())
File "/home/tjwu/kafka/docker/common.py", line 26, in execute
raise SystemError("Failure in executing following command:- ", "
".join(command))
SystemError: ('Failure in executing following command:- ', 'docker build -f
/tmp/tmpwqticp8w/native/Dockerfile -t kafka/test:3.8.0 --build-arg
kafka_url=https://archive.apache.org/dist/kafka/3.8.0/kafka_2.13-3.8.0.tgz
--build-arg build_date=2025-01-15 /tmp/tmpwqticp8w/native')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tjwu/kafka/docker/docker_build_test.py", line 79, in <module>
build_docker_image(args.image, args.tag, args.kafka_url, args.image_type)
File "/home/tjwu/kafka/docker/docker_build_test.py", line 46, in
build_docker_image
build_docker_image_runner(f"docker build -f $DOCKER_FILE -t \{image}
--build-arg kafka_url=\{kafka_url} --build-arg build_date=\{date.today()}
$DOCKER_DIR", image_type)
File "/home/tjwu/kafka/docker/common.py", line 44, in
build_docker_image_runner
raise SystemError("Docker Image Build failed")
SystemError: Docker Image Build failed
```
--
This message was sent by Atlassian Jira
(v8.20.10#820010)