From 41102fa96e01686bda4bc6117d65d5846cb198e4 Mon Sep 17 00:00:00 2001 From: MegaByte875 Date: Thu, 17 Aug 2023 11:24:36 +0800 Subject: [PATCH 1/2] update dockerfile --- Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index d8c008c..44f83e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,17 @@ FROM ubuntu:20.04 +ENV LOGROTATE_ROTATE=5 \ + LOGROTATE_SIZE=100M \ + TZ=Asia/Shanghai + RUN mkdir -p /usr/local/nebula/bin \ && mkdir -p /usr/local/certs -RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \ + echo $TZ > /etc/timezone RUN apt-get update \ && apt-get install -y --no-install-recommends ca-certificates curl cron logrotate \ && apt-get clean all -ENV LOGROTATE_ROTATE= \ - LOGROTATE_SIZE= - COPY bin/agent /usr/local/bin/agent COPY db_playback /usr/local/nebula/bin/db_playback COPY logrotate.sh /logrotate.sh From 7e6c8dd8a808c6810ff50b9ec6a7a2aa809b2a51 Mon Sep 17 00:00:00 2001 From: MegaByte875 Date: Thu, 17 Aug 2023 11:29:53 +0800 Subject: [PATCH 2/2] update ln --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 44f83e2..cae7b59 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,8 +6,8 @@ ENV LOGROTATE_ROTATE=5 \ RUN mkdir -p /usr/local/nebula/bin \ && mkdir -p /usr/local/certs -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \ - echo $TZ > /etc/timezone +RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \ + && echo $TZ > /etc/timezone RUN apt-get update \ && apt-get install -y --no-install-recommends ca-certificates curl cron logrotate \ && apt-get clean all