镜像构建历史
# 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 36.02MB 执行命令并创建新的镜像层
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-10-04 17:56:40 0.00B 设置环境变量 REDIS_DOWNLOAD_SHA
ENV REDIS_DOWNLOAD_SHA=bc34b878eb89421bbfca6fa78752343bf37af312a09eb0fae47c9575977dfaa2
# 2024-10-04 17:56:40 0.00B 设置环境变量 REDIS_DOWNLOAD_URL
ENV REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-7.4.1.tar.gz
# 2024-10-04 17:56:40 0.00B 设置环境变量 REDIS_VERSION
ENV REDIS_VERSION=7.4.1
# 2024-10-04 17:56:40 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-10-04 17:56:40 0.00B 设置环境变量 GOSU_VERSION
ENV GOSU_VERSION=1.17
# 2024-10-04 17:56:40 496.06KB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; apk add --no-cache tzdata ; # buildkit
# 2024-10-04 17:56:40 3.06KB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; addgroup -S -g 1000 redis; adduser -S -G redis -u 999 redis # buildkit
# 2024-09-06 20:05:36 0.00B 设置默认要执行的命令
CMD ["/bin/sh"]
# 2024-09-06 20:05:36 7.80MB 复制文件或目录到容器中
ADD alpine-minirootfs-3.20.3-x86_64.tar.gz / # buildkit
镜像信息
{
"Id": "sha256:87b460005bd3a6621dabf2855ec42bf96b1b6d044b6109bd9736128ab178ddec",
"RepoTags": [
"redis:7.4.1-alpine",
"redis:alpine",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/redis:7.4.1-alpine",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/redis:alpine"
],
"RepoDigests": [
"redis@sha256:c1e88455c85225310bbea54816e9c3f4b5295815e6dbf80c34d40afc6df28275",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/redis@sha256:7438ca8459132b9fe507a95fe6838fecd7c55f8611ed835742a014d7a92618e4"
],
"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.4.1",
"REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-7.4.1.tar.gz",
"REDIS_DOWNLOAD_SHA=bc34b878eb89421bbfca6fa78752343bf37af312a09eb0fae47c9575977dfaa2"
],
"Cmd": [
"redis-server"
],
"ArgsEscaped": true,
"Image": "",
"Volumes": {
"/data": {}
},
"WorkingDir": "/data",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 46725779,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/99118934b464eb90874167d438d667ea9cbd2a9814ef6ecbeca155f8a3b6ab2d/diff:/var/lib/docker/overlay2/aecb8c1f14708b32cc4ada78226da962308d175fac902f82790f24cbd68c0ccf/diff:/var/lib/docker/overlay2/27f4971a2227c73f0d2f681356ba52f8c32ea909593ecac01f9135c0e206e2f1/diff:/var/lib/docker/overlay2/f0e24df22a30fb3496a6fd38d6279ffcabd60239f9d4f737aa5770b6bf36fc08/diff:/var/lib/docker/overlay2/01d11b9cf1753f35c0bc0760b1ac9a4464670ff99620609a4eaa5ec201c43afc/diff:/var/lib/docker/overlay2/70f80dc74dbc42c41ec0abb518d6054055e93d9825ed77ba144c3ad1ca478f3b/diff:/var/lib/docker/overlay2/23c5724f3a35122d45237c48d0eec74bfb90f129834f1ecb674937c0af9f9db3/diff",
"MergedDir": "/var/lib/docker/overlay2/70916efcfaf14bef7a2299e3affa8fe37c78fef1edad7e0cdac79a03bfa597b7/merged",
"UpperDir": "/var/lib/docker/overlay2/70916efcfaf14bef7a2299e3affa8fe37c78fef1edad7e0cdac79a03bfa597b7/diff",
"WorkDir": "/var/lib/docker/overlay2/70916efcfaf14bef7a2299e3affa8fe37c78fef1edad7e0cdac79a03bfa597b7/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:75654b8eeebd3beae97271a102f57cdeb794cc91e442648544963a7e951e9558",
"sha256:284c3fbca81ff7220aa9d599069d1d11a48b1fe5d2253d7ab4cb4235e693f0ba",
"sha256:351a864ea2ef09d554a750aa08cfe9d2ebc74a38aace30de819fb179bccbd3e0",
"sha256:637873223705158f9c0a8f5fa1ac2f7776a63fce993d9d207322bd0448cd148c",
"sha256:0c31549b2fc35bac9a710981cb3955c3870f9805bc880bdaa346ef12d76c4aac",
"sha256:15a2105948e7871edbca87e66d46dbb4b3ee5b894a73d84f6e928b41f2efc5da",
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
"sha256:0b64d41d9c62f3a3f96a571b4fb78a41e8b9d9b11a6ba6432c6c8774f638a835"
]
},
"Metadata": {
"LastTagTime": "2024-11-23T16:05:13.446007404+08:00"
}
}