Skip to content

Commit

Permalink
fix(debian): RUN command with bash
Browse files Browse the repository at this point in the history
Signed-off-by: Jian Zeng <[email protected]>
  • Loading branch information
knight42 committed Aug 13, 2024
1 parent b443de8 commit dd967b1
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions base/Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
FROM debian:bookworm-slim
LABEL maintainer="Jian Zeng <anonymousknight96 AT gmail.com>" \
org.ustcmirror.images=true
RUN --mount=type=cache,target=/var/cache/apt \
RUN --mount=type=cache,sharing=locked,target=/var/cache/apt \
--mount=type=cache,sharing=locked,target=/var/lib/apt <<EOF

set -euo pipefail
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.lug.ustc.edu.cn/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
#!/bin/bash

set -euo pipefail
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.lug.ustc.edu.cn/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
EOF
ADD ["entry.sh", "savelog", "/usr/local/bin/"]
VOLUME ["/data", "/log"]
Expand Down

0 comments on commit dd967b1

Please sign in to comment.