Skip to content

Commit

Permalink
fix Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ZSYTY committed Oct 31, 2023
1 parent dfd99e4 commit 17394ad
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM polardbx/polardbxbasejava:20221129

WORKDIR /home/admin

COPY polardbx-server/target/polardbx-server drds-server
COPY docker/admin/bin/* /home/admin/bin/
COPY docker/etc/* /tmp/
COPY docker/entrypoint.sh entrypoint.sh

RUN \
chmod a+x bin/* && \
chmod a+x entrypoint.sh && \
chown admin:admin -R /home/admin && \
cp /tmp/drds /etc/logrotate.d/drds && \
cp /tmp/log_cleaner /etc/cron.d/log_cleaner && \
true

USER admin

# Set command to entrypoint.sh
ENTRYPOINT /home/admin/entrypoint.sh
2 changes: 2 additions & 0 deletions docker/etc/log_cleaner
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*/1 * * * * root /home/admin/bin/log_cleaner.sh 90 >/dev/null 2>&1

0 comments on commit 17394ad

Please sign in to comment.