镜像构建历史
# 2024-10-04 17:56:40 0.00B 设置默认要执行的命令
CMD ["redis-server"]
# 2024-10-04 17:56:40 0.00B 声明容器运行时监听的端口
EXPOSE map[6379/tcp:{}]
# 2024-10-04 17:56:40 0.00B 配置容器启动时运行的命令
ENTRYPOINT ["docker-entrypoint.sh"]
# 2024-10-04 17:56:40 661.00B 复制新文件或目录到容器中
COPY docker-entrypoint.sh /usr/local/bin/ # buildkit
# 2024-10-04 17:56:40 0.00B 设置工作目录为/data
WORKDIR /data
# 2024-10-04 17:56:40 0.00B 创建挂载点用于持久化数据或共享数据
VOLUME [/data]
# 2024-10-04 17:56:40 0.00B 执行命令并创建新的镜像层
RUN /bin/sh -c mkdir /data && chown redis:redis /data # buildkit
# 2024-10-04 17:56:40 37.58MB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends ca-certificates wget dpkg-dev gcc libc6-dev libssl-dev make ; rm -rf /var/lib/apt/lists/*; 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 BUILD_TLS=yes; 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' '{}' ';' ; rm -r /usr/src/redis; apt-mark auto '.*' > /dev/null; [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; find /usr/local -type f -executable -exec ldd '{}' ';' | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' | sort -u | xargs -r dpkg-query --search | cut -d: -f1 | sort -u | xargs -r apt-mark manual ; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; redis-cli --version; redis-server --version # buildkit
# 2024-10-04 17:56:40 0.00B 设置环境变量 REDIS_DOWNLOAD_SHA
ENV REDIS_DOWNLOAD_SHA=fb10d67a2fe2b4556f6cb840064dd6e6e3175ce8ca035f0726990ec2da9f3d0e
# 2024-10-04 17:56:40 0.00B 设置环境变量 REDIS_DOWNLOAD_URL
ENV REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-7.2.6.tar.gz
# 2024-10-04 17:56:40 0.00B 设置环境变量 REDIS_VERSION
ENV REDIS_VERSION=7.2.6
# 2024-10-04 17:56:40 4.12MB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends ca-certificates gnupg wget; rm -rf /var/lib/apt/lists/*; arch="$(dpkg --print-architecture | awk -F- '{ print $NF }')"; case "$arch" in 'amd64') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-amd64'; sha256='bbc4136d03ab138b1ad66fa4fc051bafc6cc7ffae632b069a53657279a450de3' ;; 'arm64') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-arm64'; sha256='c3805a85d17f4454c23d7059bcb97e1ec1af272b90126e79ed002342de08389b' ;; 'armel') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-armel'; sha256='f9969910fa141140438c998cfa02f603bf213b11afd466dcde8fa940e700945d' ;; 'i386') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-i386'; sha256='087dbb8fe479537e64f9c86fa49ff3b41dee1cbd28739a19aaef83dc8186b1ca' ;; 'mips64el') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-mips64el'; sha256='87140029d792595e660be0015341dfa1c02d1181459ae40df9f093e471d75b70' ;; 'ppc64el') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-ppc64el'; sha256='1891acdcfa70046818ab6ed3c52b9d42fa10fbb7b340eb429c8c7849691dbd76' ;; 'riscv64') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-riscv64'; sha256='38a6444b57adce135c42d5a3689f616fc7803ddc7a07ff6f946f2ebc67a26ba6' ;; 's390x') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-s390x'; sha256='69873bab588192f760547ca1f75b27cfcf106e9f7403fee6fd0600bc914979d0' ;; 'armhf') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-armhf'; sha256='e5866286277ff2a2159fb9196fea13e0a59d3f1091ea46ddb985160b94b6841b' ;; *) echo >&2 "error: unsupported gosu architecture: '$arch'"; exit 1 ;; esac; wget -O /usr/local/bin/gosu.asc "$url.asc"; wget -O /usr/local/bin/gosu "$url"; echo "$sha256 */usr/local/bin/gosu" | sha256sum -c -; export GNUPGHOME="$(mktemp -d)"; gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; gpgconf --kill all; rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; apt-mark auto '.*' > /dev/null; [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; chmod +x /usr/local/bin/gosu; gosu --version; gosu nobody true # buildkit
# 2024-10-04 17:56:40 0.00B 设置环境变量 GOSU_VERSION
ENV GOSU_VERSION=1.17
# 2024-10-04 17:56:40 5.08KB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends tzdata ; rm -rf /var/lib/apt/lists/* # buildkit
# 2024-10-04 17:56:40 4.30KB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; groupadd -r -g 999 redis; useradd -r -g redis -u 999 redis # buildkit
# 2024-10-04 17:56:40 74.82MB
# debian.sh --arch 'amd64' out/ 'bookworm' '@1734912000'
镜像信息
{
"Id": "sha256:b2ad206a9ee353de12daa7bc8944ea09a6b54b9b132358e94bcbca288ccc2d70",
"RepoTags": [
"redis:7.2.6",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/redis:7.2.6"
],
"RepoDigests": [
"redis@sha256:43c5c111b5b63afce26faea67198f8cf7e63b941460bcfe1525b68a6ad1eef92",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/redis@sha256:38c4532e1de69914565769b42db5494be24059fb59a8a4b03b86d000b50aca35"
],
"Parent": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2024-10-04T09:56:40Z",
"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",
"GOSU_VERSION=1.17",
"REDIS_VERSION=7.2.6",
"REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-7.2.6.tar.gz",
"REDIS_DOWNLOAD_SHA=fb10d67a2fe2b4556f6cb840064dd6e6e3175ce8ca035f0726990ec2da9f3d0e"
],
"Cmd": [
"redis-server"
],
"Image": "",
"Volumes": {
"/data": {}
},
"WorkingDir": "/data",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 116522419,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/99b15923f3b37f221fa925f582a69c249001a6dc02e772828f1889a083433374/diff:/var/lib/docker/overlay2/402a94bcf19d00eee67239c89592bdd752f5d76c8a967e422692288071d60b73/diff:/var/lib/docker/overlay2/0f5aec7c6ea4140d9408d1f9b376b7dcb5f9404c67c011e5eb22ab33347b55e9/diff:/var/lib/docker/overlay2/71044d34bdc4fc8708b40bd4a23330f3499ac1f8c88238d10267101f43ab30c5/diff:/var/lib/docker/overlay2/7314f4759e4d7f06fce1a12f986538d0718e730525cc1f5d45f99427faf76761/diff:/var/lib/docker/overlay2/6826d925885f7f91f0ce6f341caf6d72cb04e778cebda238ac78d2db3acd615b/diff:/var/lib/docker/overlay2/d7da656d9414ae961b292fa109d069e923b341eab550c2db09cb0ab256f4ae70/diff",
"MergedDir": "/var/lib/docker/overlay2/018eee77945f91d91213a9409c11fc23cb6345646d7e8d8d2bd6409dc4804c42/merged",
"UpperDir": "/var/lib/docker/overlay2/018eee77945f91d91213a9409c11fc23cb6345646d7e8d8d2bd6409dc4804c42/diff",
"WorkDir": "/var/lib/docker/overlay2/018eee77945f91d91213a9409c11fc23cb6345646d7e8d8d2bd6409dc4804c42/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:8b296f48696071aafb5a6286ca60d441a7e559b192fc7f94bb63ee93dae98f17",
"sha256:6c0504ba2a7fd411583020581166045b9728e04c9e3e48bc4ae716da13567601",
"sha256:62be9681db0e157d60201336a310cbece5f08dc363102deae31890c5297c1442",
"sha256:b44c2c180ed9e4beb323721307baff7dddee0b1eb612b0a84d4f56f147598613",
"sha256:43e83605d0b8ace41bddd320f7bce0a5ced2e279391c35c340a1af6b96f8c3df",
"sha256:ccc64c1438820c7d4c07bc493419a5d11142d87aff5269678c54d058c8ca13d3",
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
"sha256:313e959365f8e700786fa227776b3bfc71b894cd50f42d10da8ba6fc818c8402"
]
},
"Metadata": {
"LastTagTime": "2024-12-31T10:32:39.824635763+08:00"
}
}