镜像构建历史
# 2023-12-08 12:19:49 0.00B 设置默认要执行的命令
CMD ["redis-server"]
# 2023-12-08 12:19:49 0.00B 声明容器运行时监听的端口
EXPOSE map[6379/tcp:{}]
# 2023-12-08 12:19:49 0.00B 配置容器启动时运行的命令
ENTRYPOINT ["docker-entrypoint.sh"]
# 2023-12-08 12:19:49 661.00B 复制新文件或目录到容器中
COPY docker-entrypoint.sh /usr/local/bin/ # buildkit
# 2023-12-08 12:19:49 0.00B 设置工作目录为/data
WORKDIR /data
# 2023-12-08 12:19:49 0.00B 创建挂载点用于持久化数据或共享数据
VOLUME [/data]
# 2023-12-08 12:19:49 0.00B 执行命令并创建新的镜像层
RUN /bin/sh -c mkdir /data && chown redis:redis /data # buildkit
# 2023-12-08 12:19:49 30.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; echo '{"spdxVersion":"SPDX-2.3","SPDXID":"SPDXRef-DOCUMENT","name":"redis-server-sbom","packages":[{"name":"redis-server","versionInfo":"7.2.3","SPDXID":"SPDXRef-Package--redis-server","externalRefs":[{"referenceCategory":"PACKAGE-MANAGER","referenceType":"purl","referenceLocator":"pkg:generic/redis-server@7.2.3?os_name=alpine&os_version=3.19"}],"licenseDeclared":"BSD-3-Clause"}]}' > /usr/local/redis.spdx.json # buildkit
# 2023-12-08 12:19:49 0.00B 设置环境变量 REDIS_DOWNLOAD_SHA
ENV REDIS_DOWNLOAD_SHA=3e2b196d6eb4ddb9e743088bfc2915ccbb42d40f5a8a3edd8cb69c716ec34be7
# 2023-12-08 12:19:49 0.00B 设置环境变量 REDIS_DOWNLOAD_URL
ENV REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-7.2.3.tar.gz
# 2023-12-08 12:19:49 0.00B 设置环境变量 REDIS_VERSION
ENV REDIS_VERSION=7.2.3
# 2023-12-08 12:19:49 2.44MB 执行命令并创建新的镜像层
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
# 2023-12-08 12:19:49 0.00B 设置环境变量 GOSU_VERSION
ENV GOSU_VERSION=1.17
# 2023-12-08 12:19:49 1.15MB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; apk add --no-cache tzdata ; # buildkit
# 2023-12-08 12:19:49 4.70KB 执行命令并创建新的镜像层
RUN /bin/sh -c set -eux; addgroup -S -g 1000 redis; adduser -S -G redis -u 999 redis # buildkit
# 2023-12-08 09:20:49 0.00B
/bin/sh -c #(nop) CMD ["/bin/sh"]
# 2023-12-08 09:20:49 7.38MB
/bin/sh -c #(nop) ADD file:1f4eb46669b5b6275af19eb7471a6899a61c276aa7d925b8ae99310b14b75b92 in /
镜像信息
{
"Id": "sha256:d2d4688fcebeb127fbc1e00693c3b4165ba8a02bf1e0347dd7d9ba38f6199afe",
"RepoTags": [
"redis:7.2.3-alpine",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/redis:7.2.3-alpine"
],
"RepoDigests": [
"redis@sha256:090276da2603db19b154602c374f505d94c10ea57e9749fc3e68e955284bf0fd",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/redis@sha256:2c8f6ecce767cd325d3b1d6390c56bab7d4ead99245c7f1bd607bb2b12b26079"
],
"Parent": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2023-12-08T04:19:49Z",
"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.3",
"REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-7.2.3.tar.gz",
"REDIS_DOWNLOAD_SHA=3e2b196d6eb4ddb9e743088bfc2915ccbb42d40f5a8a3edd8cb69c716ec34be7"
],
"Cmd": [
"redis-server"
],
"ArgsEscaped": true,
"Image": "",
"Volumes": {
"/data": {}
},
"WorkingDir": "/data",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 40996592,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/3db862405fe1afaa1d92167372383edd83aa612a2edcd527191e44656b396f57/diff:/var/lib/docker/overlay2/6df520b7a2ab90136d95de40165ce674a0b4a44a37fb7331ced0e4e24d366a71/diff:/var/lib/docker/overlay2/fde2d0fc7c04e664a8953e18c9fff1778a1face7d11eccc41b667c9a087a41a6/diff:/var/lib/docker/overlay2/e8ba88f77ecdf3726b341112d96f0769f677f5ef16e44c08c3448e142bb54796/diff:/var/lib/docker/overlay2/fce347e67d8a3d9786295dff419f778475e6377172b1f773f81b91244f8ed66e/diff:/var/lib/docker/overlay2/6604b0bf45391687b565935a14bedfd19556da656cb48369a7ae4f4a35cee275/diff:/var/lib/docker/overlay2/22c346987d4c41d32618611fdfbc3ed515b9a196c0d045a0fe388893bef7a12f/diff",
"MergedDir": "/var/lib/docker/overlay2/e85043d94176d5a28fc9bfd797cc7fb93280cdcc29e7ecdb60785e82d620a766/merged",
"UpperDir": "/var/lib/docker/overlay2/e85043d94176d5a28fc9bfd797cc7fb93280cdcc29e7ecdb60785e82d620a766/diff",
"WorkDir": "/var/lib/docker/overlay2/e85043d94176d5a28fc9bfd797cc7fb93280cdcc29e7ecdb60785e82d620a766/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:5af4f8f59b764c64c6def53f52ada809fe38d528441d08d01c206dfb3fc3b691",
"sha256:c22292edbdb3936f3b0c43d145422a7ed02d3ed298123faeb47302dff486272a",
"sha256:b5fe5165aeddd7523646d6e8aa4828817efdbed0c5d03d06a75c9db1306196cc",
"sha256:8ac59f7a1ab9f7ad5e5547b57a90e120b3ad4740667f60c4a4bb988e7d5390a6",
"sha256:caf065bf2e4028b6904e632891d9e5c675c83e4051e477fed53dca0ff5063a18",
"sha256:ac9404cab76784b8a634dea202824ed51f13a93696cb444b76ea0b3210b5194f",
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
"sha256:97d8a180f4289e90475691728c7b3bd76dd988564afc1c20e7d44a4f65bdf221"
]
},
"Metadata": {
"LastTagTime": "2024-09-26T14:00:39.344998837+08:00"
}
}