Skip to content

Commit

Permalink
base: Move install to top of Dockerfile, change ENTRYPOINT to CMD
Browse files Browse the repository at this point in the history
  • Loading branch information
iBug committed Jul 2, 2024
1 parent 2e548e5 commit 1d57dec
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions base/Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM alpine:3.16
LABEL maintainer="Jian Zeng <anonymousknight96 AT gmail.com>" \
org.ustcmirror.images=true
ADD ["entry.sh", "savelog", "/usr/local/bin/"]
VOLUME ["/data", "/log"]
ENTRYPOINT ["entry.sh"]
RUN apk add --no-cache bash tzdata su-exec && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ADD ["entry.sh", "savelog", "/usr/local/bin/"]
VOLUME ["/data", "/log"]
CMD ["/entry.sh"]
6 changes: 3 additions & 3 deletions base/Dockerfile.alpine-edge
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM alpine:edge
LABEL maintainer="Yifan Gao<git AT yfgao.com>" \
org.ustcmirror.images=true
ADD ["entry.sh", "savelog", "/usr/local/bin/"]
VOLUME ["/data", "/log"]
ENTRYPOINT ["entry.sh"]
RUN apk add --no-cache bash tzdata su-exec && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ADD ["entry.sh", "savelog", "/usr/local/bin/"]
VOLUME ["/data", "/log"]
CMD ["/entry.sh"]
6 changes: 3 additions & 3 deletions base/Dockerfile.centos
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM centos:7
LABEL maintainer="Jian Zeng <anonymousknight96 AT gmail.com>" \
org.ustcmirror.images=true
ADD ["entry.sh", "savelog", "/usr/local/bin/"]
VOLUME ["/data", "/log"]
ENTRYPOINT ["entry.sh"]
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
curl -fLo /usr/local/bin/su-exec https://ftp.lug.ustc.edu.cn/misc/su-exec && chmod +x /usr/local/bin/su-exec && \
echo "592f25c51d0e4c90945ece8c4fa35018d20a1091ac109c98b66eb95deef211c7 /usr/local/bin/su-exec" | sha256sum -c -
ADD ["entry.sh", "savelog", "/usr/local/bin/"]
VOLUME ["/data", "/log"]
CMD ["/entry.sh"]
6 changes: 3 additions & 3 deletions base/Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM debian:bookworm-slim
LABEL maintainer="Jian Zeng <anonymousknight96 AT gmail.com>" \
org.ustcmirror.images=true
ADD ["entry.sh", "savelog", "/usr/local/bin/"]
VOLUME ["/data", "/log"]
ENTRYPOINT ["entry.sh"]
RUN echo 'Asia/Shanghai' > /etc/timezone && dpkg-reconfigure -f noninteractive tzdata && \
apt-get update && apt-get install -y wget && \
wget -O /usr/local/bin/su-exec https://ftp.ustclug.org/misc/su-exec && chmod +x /usr/local/bin/su-exec && \
echo "592f25c51d0e4c90945ece8c4fa35018d20a1091ac109c98b66eb95deef211c7 /usr/local/bin/su-exec" | sha256sum -c - && \
apt-get purge -y --auto-remove wget && rm -rf /var/lib/apt/lists/*
ADD ["entry.sh", "savelog", "/usr/local/bin/"]
VOLUME ["/data", "/log"]
CMD ["/entry.sh"]

0 comments on commit 1d57dec

Please sign in to comment.