mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-13 06:30:20 +08:00
29 lines
1.1 KiB
Docker
29 lines
1.1 KiB
Docker
FROM ubuntu:24.04
|
|
|
|
COPY root-logging-tests /usr/local/bin/root-logging-tests
|
|
|
|
RUN set -eu; \
|
|
bucket="$(date -u +%Y-%m-%d)"; \
|
|
for entrypoint in standard reloadable; do \
|
|
for destination in file both; do \
|
|
for format in pretty json; do \
|
|
for owner in 0 1000 65532 new; do \
|
|
directory="/logs/${entrypoint}-${destination}-${format}-${owner}"; \
|
|
mkdir -p "${directory}"; \
|
|
chown 1000:1000 "${directory}"; \
|
|
chmod 0750 "${directory}"; \
|
|
if [ "${owner}" != new ]; then \
|
|
logfile="${directory}/root-logging-test.${bucket}.log"; \
|
|
printf 'historical log\n' >"${logfile}"; \
|
|
chown "${owner}:${owner}" "${logfile}"; \
|
|
chmod 0640 "${logfile}"; \
|
|
fi; \
|
|
done; \
|
|
done; \
|
|
done; \
|
|
done
|
|
|
|
USER 0:0
|
|
VOLUME ["/logs"]
|
|
ENTRYPOINT ["/usr/local/bin/root-logging-tests", "--ignored", "--exact", "root_appends_to_existing_logs_without_changing_ownership", "--nocapture"]
|