镜像构建历史
# 2024-05-23 07:17:59 0.00B 设置默认要执行的命令
CMD ["redis-server"]
# 2024-05-23 07:17:59 0.00B 声明容器运行时监听的端口
EXPOSE map[6379/tcp:{}]
# 2024-05-23 07:17:59 0.00B 配置容器启动时运行的命令
ENTRYPOINT ["docker-entrypoint.sh"]
# 2024-05-23 07:17:59 661.00B 复制新文件或目录到容器中
COPY docker-entrypoint.sh /usr/local/bin/ # buildkit
# 2024-05-23 07:17:59 0.00B 设置工作目录为/data
WORKDIR /data
# 2024-05-23 07:17:59 0.00B 创建挂载点用于持久化数据或共享数据
VOLUME [/data]
# 2024-05-23 07:17:59 0.00B 执行命令并创建新的镜像层
RUN /bin/sh -c mkdir /data && chown redis:redis /data # buildkit
# 2024-05-23 07:17:59 22.22MB 执行命令并创建新的镜像层
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 wget ; 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; 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; apk del --no-network .build-deps; redis-cli --version; redis-server --version # buildkit
# 2024-05-23 07:17:59 0.00B 设置环境变量 REDIS_DOWNLOAD_SHA
ENV REDIS_DOWNLOAD_SHA=98066f5363504b26c34dd20fbcc3c957990d764cdf42576c836fc021073f4341
# 2024-05-23 07:17:59 0.00B 设置环境变量 REDIS_DOWNLOAD_URL
ENV REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-7.0.15.tar.gz
# 2024-05-23 07:17:59 0.00B 设置环境变量 REDIS_VERSION
ENV REDIS_VERSION=7.0.15
# 2024-05-23 07:17:59 2.41MB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; apk add --no-cache --virtual .gosu-fetch gnupg; arch="$(apk --print-arch)"; case "$arch" in 'x86_64') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-amd64'; sha256='bbc4136d03ab138b1ad66fa4fc051bafc6cc7ffae632b069a53657279a450de3' ;; 'aarch64') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-arm64'; sha256='c3805a85d17f4454c23d7059bcb97e1ec1af272b90126e79ed002342de08389b' ;; 'armhf') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-armhf'; sha256='e5866286277ff2a2159fb9196fea13e0a59d3f1091ea46ddb985160b94b6841b' ;; 'x86') url='https://github.com/tianon/gosu/releases/download/1.17/gosu-i386'; sha256='087dbb8fe479537e64f9c86fa49ff3b41dee1cbd28739a19aaef83dc8186b1ca' ;; 'ppc64le') 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' ;; 'armv7') 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; apk del --no-network .gosu-fetch; chmod +x /usr/local/bin/gosu; gosu --version; gosu nobody true # buildkit
# 2024-05-23 07:17:59 0.00B 设置环境变量 GOSU_VERSION
ENV GOSU_VERSION=1.17
# 2024-05-23 07:17:59 496.06KB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; apk add --no-cache tzdata ; # buildkit
# 2024-05-23 07:17:59 3.06KB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; addgroup -S -g 1000 redis; adduser -S -G redis -u 999 redis # buildkit
# 2024-05-23 07:17:59 0.00B
/bin/sh -c #(nop) CMD ["/bin/sh"]
# 2024-05-23 07:17:59 7.80MB
/bin/sh -c #(nop) ADD file:5758b97d8301c84a204a6e516241275d785a7cade40b2fb99f01fe122482e283 in /
镜像信息
{
"Id": "sha256:426f6fb54a1b82a2254bce70e5f4a72d15c14ecd3cc70d799465b956e7a32548",
"RepoTags": [
"redis:7.0.15-alpine",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/redis:7.0.15-alpine"
],
"RepoDigests": [
"redis@sha256:c9d92d840fd011c908f040592857c724ae6d877f2aba5c40ad963276507386b2",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/redis@sha256:56e4f286b852235a50017612fcb0022d5f83416a3cca4db6684f69685708813a"
],
"Parent": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2024-05-22T23:17:59Z",
"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.0.15",
"REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-7.0.15.tar.gz",
"REDIS_DOWNLOAD_SHA=98066f5363504b26c34dd20fbcc3c957990d764cdf42576c836fc021073f4341"
],
"Cmd": [
"redis-server"
],
"ArgsEscaped": true,
"Image": "",
"Volumes": {
"/data": {}
},
"WorkingDir": "/data",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 32921998,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/383458ee4776f93e0901664f7e195a0617b600e6c822f8b38c519315f01c1cf9/diff:/var/lib/docker/overlay2/651b56430018eb2205a04d118d8f73d7c844f6c0db2b37374cea39d0c4bda1dd/diff:/var/lib/docker/overlay2/223b2e49b889ca7036435e8366d145002eafb82e93da6271316ff700acc5b779/diff:/var/lib/docker/overlay2/a30b47c3bf099b02b2df49b65589dec6aefe1193943e37dcb118b16012d991f3/diff:/var/lib/docker/overlay2/528d77f66e7f4e241b4f75c21387871b8795503f77b242f1073e3b7f470c63bf/diff:/var/lib/docker/overlay2/41dad4f63840dae2725cdb846c5776a24d23b18b96800f52ca9c1ff77effaf7f/diff:/var/lib/docker/overlay2/56dbc2212cbc9b991b1a93a72a8c08a3a8460c06576fe4f3267009446334aa65/diff",
"MergedDir": "/var/lib/docker/overlay2/e6b0cefe6874fff8d8c03cc4322b46436c00d14eaab0b5ab889d1659b1928b3c/merged",
"UpperDir": "/var/lib/docker/overlay2/e6b0cefe6874fff8d8c03cc4322b46436c00d14eaab0b5ab889d1659b1928b3c/diff",
"WorkDir": "/var/lib/docker/overlay2/e6b0cefe6874fff8d8c03cc4322b46436c00d14eaab0b5ab889d1659b1928b3c/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:63ca1fbb43ae5034640e5e6cb3e083e05c290072c5366fcaa9d62435a4cced85",
"sha256:0744398ac43f8f2c447b4bb8c3eb71a25e03f0b429d09fb5e64a447f7e6a8e40",
"sha256:e91918db3e71ceaf8da19f6e9c2e213481abda585dac5a06a9b9e66cd0e571f7",
"sha256:e0682facac1170be9acd4587be97c9625031e1cc93e515a52b6beca8a13b3c6b",
"sha256:b340be0238d86db73c527fd0f8eddcfb055e59ea9b9acebe55c7122f87c37c66",
"sha256:26c5a3dbebde13d0f2d0d7ccca101acf32c9c012324e5e142c8455ab53e6faee",
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
"sha256:d54c7f63022c77e618291fdda155c554f40c5aae8f4c284bd360884748d3bd61"
]
},
"Metadata": {
"LastTagTime": "2025-01-17T17:30:15.507146713+08:00"
}
}