镜像构建历史
# 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 0.00B 设置默认要执行的命令
CMD ["bash"]
# 2024-10-04 17:56:40 74.78MB 复制文件或目录到容器中
ADD rootfs.tar.xz / # buildkit
镜像信息
{
"Id": "sha256:1c8ce664fe7f7f292f9fcb71b08af3d9543b4b06db5f64f3f933b5ca7ed91d2f",
"RepoTags": [
"redis:7.2-bookworm",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/redis:7.2-bookworm"
],
"RepoDigests": [
"redis@sha256:4305c23e67690efec3151f667c77fa943c0ab537c0026e66931f0f048ac05879",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/redis@sha256:d2f758d11e2e03dba4158b00726c1d3d28bff676265f9d2b86d0873318e8af79"
],
"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"
],
"ArgsEscaped": true,
"Image": "",
"Volumes": {
"/data": {}
},
"WorkingDir": "/data",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 116481107,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/0944e535710e671872d6b13f32a7aad121c3c081c05889674e3411eaf86f222e/diff:/var/lib/docker/overlay2/eb236252609f97c44fde3265b90d02a8bffe2e8e5517d0be65a96c27bb8183f0/diff:/var/lib/docker/overlay2/c3c82e6a1a5cf3611607747e8689ba8d51a17efa81c45f7e2916d80f9fb3e589/diff:/var/lib/docker/overlay2/ab90e975cdcb088ff41f501be788debbf3dbd6ea23aa2954833035e18cd3d778/diff:/var/lib/docker/overlay2/3d8783e5159235f1c670d396c331df980c49945d943d3b1c104a3f6bfc9a6d25/diff:/var/lib/docker/overlay2/c50d8c67bbd186b9826881aad8117691834cb9d0f14a9724ccc47f1c37edca45/diff:/var/lib/docker/overlay2/91eaeb3375babd906dc7e8a6c516620560ab7dbfb21b9881f9ae71d2e2f398b0/diff",
"MergedDir": "/var/lib/docker/overlay2/f26267dd993600897f26b9fddb8db4821da2cd947970790f180f87bac0b74b13/merged",
"UpperDir": "/var/lib/docker/overlay2/f26267dd993600897f26b9fddb8db4821da2cd947970790f180f87bac0b74b13/diff",
"WorkDir": "/var/lib/docker/overlay2/f26267dd993600897f26b9fddb8db4821da2cd947970790f180f87bac0b74b13/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:c3548211b8264f8bfa47a6727043a64f1791b82ac965a284a7ea187e971a95e2",
"sha256:4b667885d04a110f8e6275b8d1ce450283d9b0fa18c4c134bbd2f0cc114c2386",
"sha256:46a41da10b65b9492b9a726bae73d61c15dcb01d03204a5332497cd0666e0535",
"sha256:66b96985a9ba6ca0f1869ea7636ec3b3771ec7a431af2bf14bb6da7395714dcc",
"sha256:f89256a602d6a7f1d2b3fc5e259f6cc98c8386c9f75e5f82b9e542b4d6623373",
"sha256:b88e12457233721ca283289cbd486de099a71fcedb0d4cb8b2c28cc4de047c02",
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
"sha256:d86b43152d4b28a75c75eb518fb63452fb110ee129cea0c821e31aa8a5512951"
]
},
"Metadata": {
"LastTagTime": "2024-11-14T17:25:36.9783082+08:00"
}
}