镜像构建历史
# 2025-01-07 00:14:31 0.00B 设置默认要执行的命令
CMD ["redis-server"]
# 2025-01-07 00:14:31 0.00B 声明容器运行时监听的端口
EXPOSE map[6379/tcp:{}]
# 2025-01-07 00:14:31 0.00B 配置容器启动时运行的命令
ENTRYPOINT ["docker-entrypoint.sh"]
# 2025-01-07 00:14:31 661.00B 复制新文件或目录到容器中
COPY docker-entrypoint.sh /usr/local/bin/ # buildkit
# 2025-01-07 00:14:31 0.00B 设置工作目录为/data
WORKDIR /data
# 2025-01-07 00:14:31 0.00B 创建挂载点用于持久化数据或共享数据
VOLUME [/data]
# 2025-01-07 00:14:31 0.00B 执行命令并创建新的镜像层
RUN /bin/sh -c mkdir /data && chown redis:redis /data # buildkit
# 2025-01-07 00:14:31 38.08MB 执行命令并创建新的镜像层
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
# 2025-01-07 00:14:31 0.00B 设置环境变量 REDIS_DOWNLOAD_SHA
ENV REDIS_DOWNLOAD_SHA=4ddebbf09061cbb589011786febdb34f29767dd7f89dbe712d2b68e808af6a1f
# 2025-01-07 00:14:31 0.00B 设置环境变量 REDIS_DOWNLOAD_URL
ENV REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-7.4.2.tar.gz
# 2025-01-07 00:14:31 0.00B 设置环境变量 REDIS_VERSION
ENV REDIS_VERSION=7.4.2
# 2025-01-07 00:14:31 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
# 2025-01-07 00:14:31 0.00B 设置环境变量 GOSU_VERSION
ENV GOSU_VERSION=1.17
# 2025-01-07 00:14:31 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
# 2025-01-07 00:14:31 4.30KB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; groupadd -r -g 999 redis; useradd -r -g redis -u 999 redis # buildkit
# 2025-01-07 00:14:31 74.77MB
# debian.sh --arch 'amd64' out/ 'bookworm' '@1736726400'
镜像信息
{
"Id": "sha256:4075a3f8c3f8e3878d1041c5019e4af445e3b79cf3b55e03063f9813cd49e3f2",
"RepoTags": [
"redis:7.4.2",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/redis:7.4.2"
],
"RepoDigests": [
"redis@sha256:ca65ea36ae16e709b0f1c7534bc7e5b5ac2e5bb3c97236e4fec00e3625eb678d",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/redis@sha256:ab74141ad225c99d0257eb89da2661a9e971a338a7047ed532ba5db1e58e4c6f"
],
"Parent": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2025-01-06T16:14:31Z",
"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.4.2",
"REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-7.4.2.tar.gz",
"REDIS_DOWNLOAD_SHA=4ddebbf09061cbb589011786febdb34f29767dd7f89dbe712d2b68e808af6a1f"
],
"Cmd": [
"redis-server"
],
"Image": "",
"Volumes": {
"/data": {}
},
"WorkingDir": "/data",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 116978665,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/3cf530006adac161a5870d57c62e2e4e3c4f699443698f90c2b3249c730d44f3/diff:/var/lib/docker/overlay2/fab97f294abe50e7f37529de0ca2bc79e1a1bb79da4ca3dfeb597effca1fe438/diff:/var/lib/docker/overlay2/89dbb89cbccde85ef63c8b9c461d472bbb9844e4f74a8ca6950cbf523b7a2fc9/diff:/var/lib/docker/overlay2/62b4763e0ef57c9b55c98fe4208799f9f91022db203218eabd0aa16a5186ba9c/diff:/var/lib/docker/overlay2/eea21adcef3f9b6148a30556790232611053a95c505812995dd653707a979bb3/diff:/var/lib/docker/overlay2/68753abe5b31d61afd5fd0988b087628eff40ae2aeab4bd2e364dbd90ec668f4/diff:/var/lib/docker/overlay2/84c5fbb64568c2307107468523b21101c6d2cc2d93b7bd46134875b7faeff5d5/diff",
"MergedDir": "/var/lib/docker/overlay2/3582cdd44e2c83bc97b56f1dd24bf5c29df4267c2e09f0f5af8ce0644b069302/merged",
"UpperDir": "/var/lib/docker/overlay2/3582cdd44e2c83bc97b56f1dd24bf5c29df4267c2e09f0f5af8ce0644b069302/diff",
"WorkDir": "/var/lib/docker/overlay2/3582cdd44e2c83bc97b56f1dd24bf5c29df4267c2e09f0f5af8ce0644b069302/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:f5fe472da25334617e6e6467c7ebce41e0ae5580e5bd0ecbf0d573bacd560ecb",
"sha256:3e62a323d3749bd1fc58ef850f0d6e5a9c901f71cc160426da9f6fb7507293ef",
"sha256:b5a15fcf554ab5310928776fceacdc57d225c145d96a3d3b62382a31684a6c7e",
"sha256:fa0153bbaee8155f787cd50f14c0ca75ab0939bcfe9ebc5164a571d9745310c9",
"sha256:494d873445efdfc478c39c7829d6af3c0139c6c932756122e27ede8487bbe9dd",
"sha256:1be097ffc68437de9bf30661ae61b5ab933d75cbeb769f3749084f033f7335d6",
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
"sha256:ca15e9bb0d852a5e8c1d4c3264fa085f68197056b80da09003764bfa6dda5067"
]
},
"Metadata": {
"LastTagTime": "2025-01-15T14:10:41.272167669+08:00"
}
}