镜像构建历史
# 2025-08-04 20:27:33 0.00B 设置默认要执行的命令
CMD ["redis-server"]
# 2025-08-04 20:27:33 0.00B 声明容器运行时监听的端口
EXPOSE map[6379/tcp:{}]
# 2025-08-04 20:27:33 0.00B 配置容器启动时运行的命令
ENTRYPOINT ["docker-entrypoint.sh"]
# 2025-08-04 20:27:33 4.85KB 复制新文件或目录到容器中
COPY docker-entrypoint.sh /usr/local/bin/ # buildkit
# 2025-08-04 20:27:33 0.00B 设置工作目录为/data
WORKDIR /data
# 2025-08-04 20:27:33 0.00B 创建挂载点用于持久化数据或共享数据
VOLUME [/data]
# 2025-08-04 20:27:33 0.00B 执行命令并创建新的镜像层
RUN /bin/sh -c mkdir /data && chown redis:redis /data # buildkit
# 2025-08-04 20:27:33 60.07MB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; apk add --no-cache --virtual .build-deps coreutils dpkg-dev dpkg gcc linux-headers make musl-dev openssl-dev g++; arch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; case "$arch" in 'amd64') export BUILD_WITH_MODULES=yes; export INSTALL_RUST_TOOLCHAIN=yes; export DISABLE_WERRORS=yes ;; 'arm64') export BUILD_WITH_MODULES=yes; export INSTALL_RUST_TOOLCHAIN=yes; export DISABLE_WERRORS=yes ;; *) echo >&2 "Modules are NOT supported! unsupported architecture: '$arch'"; export BUILD_WITH_MODULES=no ;; esac; if [ "$BUILD_WITH_MODULES" = "yes" ]; then apk add --no-cache --virtual .module-build-deps autoconf automake bash bsd-compat-headers build-base cargo clang clang-static clang-libclang cmake curl g++ git libffi-dev libgcc libtool llvm-dev ncurses-dev openssh openssl py-virtualenv py3-cryptography py3-pip py3-virtualenv python3 python3-dev rsync tar unzip which xsimd xz; fi; pip install -q --upgrade setuptools && pip install -q --upgrade pip && PIP_BREAK_SYSTEM_PACKAGES=1 pip install -q addict toml jinja2 ramp-packer ; wget -O redis.tar.gz "$REDIS_DOWNLOAD_URL"; echo "$REDIS_DOWNLOAD_SHA *redis.tar.gz" | sha256sum -c -; mkdir -p /usr/src/redis; tar -xzf redis.tar.gz -C /usr/src/redis --strip-components=1; rm redis.tar.gz; grep -E '^ *createBoolConfig[(]"protected-mode",.*, *1 *,.*[)],$' /usr/src/redis/src/config.c; sed -ri 's!^( *createBoolConfig[(]"protected-mode",.*, *)1( *,.*[)],)$!\10\2!' /usr/src/redis/src/config.c; grep -E '^ *createBoolConfig[(]"protected-mode",.*, *0 *,.*[)],$' /usr/src/redis/src/config.c; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; extraJemallocConfigureFlags="--build=$gnuArch"; dpkgArch="$(dpkg --print-architecture)"; case "${dpkgArch##*-}" in amd64 | i386 | x32) extraJemallocConfigureFlags="$extraJemallocConfigureFlags --with-lg-page=12" ;; *) extraJemallocConfigureFlags="$extraJemallocConfigureFlags --with-lg-page=16" ;; esac; extraJemallocConfigureFlags="$extraJemallocConfigureFlags --with-lg-hugepage=21"; grep -F 'cd jemalloc && ./configure ' /usr/src/redis/deps/Makefile; sed -ri 's!cd jemalloc && ./configure !&'"$extraJemallocConfigureFlags"' !' /usr/src/redis/deps/Makefile; grep -F "cd jemalloc && ./configure $extraJemallocConfigureFlags " /usr/src/redis/deps/Makefile; export RUST_DYN_CRT=1; export BUILD_TLS=yes; if [ "$BUILD_WITH_MODULES" = "yes" ]; then make -C /usr/src/redis/modules/redisjson get_source; sed -i 's/^RUST_FLAGS=$/RUST_FLAGS += -C target-feature=-crt-static/' /usr/src/redis/modules/redisjson/src/Makefile ; grep -E 'RUST_FLAGS' /usr/src/redis/modules/redisjson/src/Makefile; fi; make -C /usr/src/redis -j "$(nproc)" all; make -C /usr/src/redis install; serverMd5="$(md5sum /usr/local/bin/redis-server | cut -d' ' -f1)"; export serverMd5; find /usr/local/bin/redis* -maxdepth 0 -type f -not -name redis-server -exec sh -eux -c ' md5="$(md5sum "$1" | cut -d" " -f1)"; test "$md5" = "$serverMd5"; ' -- '{}' ';' -exec ln -svfT 'redis-server' '{}' ';' ; make -C /usr/src/redis distclean; rm -r /usr/src/redis; runDeps="$( scanelf --needed --nobanner --format '%n#p' --recursive /usr/local | tr ',' '\n' | sort -u | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' )"; apk add --no-network --virtual .redis-rundeps $runDeps; if [ "$BUILD_WITH_MODULES" = "yes" ]; then apk del --no-network .module-build-deps; fi; apk del --no-network .build-deps; rm -rf ~/.cache ~/.gitconfig; redis-cli --version; redis-server --version; # buildkit
# 2025-08-04 20:27:33 0.00B 设置环境变量 REDIS_DOWNLOAD_SHA
ENV REDIS_DOWNLOAD_SHA=c64219bdcba407d18c8dde1fb87b86945aebf75e60f5b44ff463785a962645ed
# 2025-08-04 20:27:33 0.00B 设置环境变量 REDIS_DOWNLOAD_URL
ENV REDIS_DOWNLOAD_URL=https://github.com/redis/redis/archive/refs/tags/8.2.0.tar.gz
# 2025-08-04 20:27:33 702.31KB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; apk add --no-cache tzdata setpriv ; # buildkit
# 2025-08-04 20:27:33 3.05KB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; addgroup -S -g 1000 redis; adduser -S -G redis -u 999 redis # buildkit
# 2025-07-15 19:01:16 0.00B 设置默认要执行的命令
CMD ["/bin/sh"]
# 2025-07-15 19:01:16 8.51MB 复制文件或目录到容器中
ADD alpine-minirootfs-3.22.1-aarch64.tar.gz / # buildkit
镜像信息
{
"Id": "sha256:e69a8d5fb393162933be63b154f63aebbc522ffe594d4c62e1a389b7d2df1853",
"RepoTags": [
"redis:8-alpine",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/redis:8-alpine-linuxarm64"
],
"RepoDigests": [
"redis@sha256:7521abdff715d396aa482183942f3fe643344287c29ccb66eee16ac08a92190f",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/redis@sha256:2b8f0c2c92242162ff05308de6f903f7451128cc3112c8cc0bc9e74ede5e252f"
],
"Parent": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2025-08-04T12:27:33Z",
"Container": "",
"ContainerConfig": null,
"DockerVersion": "",
"Author": "",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"6379/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"REDIS_DOWNLOAD_URL=https://github.com/redis/redis/archive/refs/tags/8.2.0.tar.gz",
"REDIS_DOWNLOAD_SHA=c64219bdcba407d18c8dde1fb87b86945aebf75e60f5b44ff463785a962645ed"
],
"Cmd": [
"redis-server"
],
"Image": "",
"Volumes": {
"/data": {}
},
"WorkingDir": "/data",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": null
},
"Architecture": "arm64",
"Variant": "v8",
"Os": "linux",
"Size": 69290406,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/e2d02c50168d0966f9158076a12b081e90ccc4ded57cd980698e4b84812a38d0/diff:/var/lib/docker/overlay2/810bda172bd8fa919101c4d0aed5ecf33073a7f733f27221133426884c1906c3/diff:/var/lib/docker/overlay2/b5b8776b12f00930ffb322da36911879d6dd9f3626f4419974e7b5b830cf31c2/diff:/var/lib/docker/overlay2/1bb11904561eb888dc342e0be20aa50898b524ef2f04caf7e9ad5503c17c8721/diff:/var/lib/docker/overlay2/c61535f7578db0896def7fb66d811f6465c5723efd585b76c4dd99d83a1c0982/diff:/var/lib/docker/overlay2/f5e718d8a0e870ff4cf6480f22588d909d8993919d5d119bfbea43bb872e48fe/diff",
"MergedDir": "/var/lib/docker/overlay2/75d81152151c66e67dfc3696e0869bfc95072f2c8ced7c3852038f7862ca0a7d/merged",
"UpperDir": "/var/lib/docker/overlay2/75d81152151c66e67dfc3696e0869bfc95072f2c8ced7c3852038f7862ca0a7d/diff",
"WorkDir": "/var/lib/docker/overlay2/75d81152151c66e67dfc3696e0869bfc95072f2c8ced7c3852038f7862ca0a7d/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:0b83d017db6efafadf6b3f18d087d2ce1d67d8f0e927dc7254b0ad088074cd3a",
"sha256:09dc89fcc14f3a4efe1cc559ec4a5ec9e13d1b661cdb98927f85b88f59c3c9db",
"sha256:939ed4919f35c24efe669ff840ed42fb4b729e4402cfa9d706d3961a0833a9f1",
"sha256:6303931abf2f8f229a4dc9e7785b6dbc2a2673ce4d2f212af4f93e150a41eee5",
"sha256:d3059d5cd5fd326999b9ff33d226b39e0f2c372069f910b11082216ce80b6e9d",
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
"sha256:7fe460da02c53e08cebf4e49e1e2a17091ac294bb44917e4d396dd5827999ea1"
]
},
"Metadata": {
"LastTagTime": "2025-08-07T20:16:20.886482828+08:00"
}
}