镜像构建历史
# 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 19.34MB 执行命令并创建新的镜像层
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=34e74856cbd66fdb3a684fb349d93961d8c7aa668b06f81fd93ff267d09bc277
# 2024-05-23 07:17:59 0.00B 设置环境变量 REDIS_DOWNLOAD_URL
ENV REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-6.2.14.tar.gz
# 2024-05-23 07:17:59 0.00B 设置环境变量 REDIS_VERSION
ENV REDIS_VERSION=6.2.14
# 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 514.78KB 执行命令并创建新的镜像层
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:99093095d62d0421541d882f9ceeddb2981fe701ec0aa9d2c08480712d5fed21 in /
镜像信息
{
"Id": "sha256:36c1d3cfe18f4b12d4640576f7048068acbfc3625027b6bbb46bba0e31b11831",
"RepoTags": [
"redis:6.2-alpine",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/redis:6.2-alpine"
],
"RepoDigests": [
"redis@sha256:e3b17ba9479deec4b7d1eeec1548a253acc5374d68d3b27937fcfe4df8d18c7e",
"swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/redis@sha256:32f8533a9bf6c3940127375e708be8f423a04bbbe7b20ed4c2e85aa85447b354"
],
"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=6.2.14",
"REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-6.2.14.tar.gz",
"REDIS_DOWNLOAD_SHA=34e74856cbd66fdb3a684fb349d93961d8c7aa668b06f81fd93ff267d09bc277"
],
"Cmd": [
"redis-server"
],
"ArgsEscaped": true,
"Image": "",
"Volumes": {
"/data": {}
},
"WorkingDir": "/data",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": null
},
"Architecture": "amd64",
"Os": "linux",
"Size": 30067552,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/6d57776bfa2ec2a0a07966950072c5f8401ae946ac482a491ff3e6137a6503e4/diff:/var/lib/docker/overlay2/5bc8b957130fe324460947ef354c6712d8afcd60450a8614b0626c567daa87ae/diff:/var/lib/docker/overlay2/7e62ed76e4d7b50bc3293a4864dbae7f4554413c60a2857eeaf0e600197a8bbe/diff:/var/lib/docker/overlay2/c771941956a19ef856445a25eaf93040803335d9a6c141874944c14bf3d61df0/diff:/var/lib/docker/overlay2/d1ee8d580823d67e1be4bd021ea9bbed3ef94081f2e1ed58daafa99ff97db0a6/diff:/var/lib/docker/overlay2/846f5d23292903e7dd1a33b12dac18ffc172d0d4e3971b4bb1f904f2cf349ef6/diff:/var/lib/docker/overlay2/b432477cd1cfc4da8de6bb2978a146d43084f40cc2835da168b5343dbae9540a/diff",
"MergedDir": "/var/lib/docker/overlay2/36eacbd676e5b7b9518a422833d079a43143185f985d734ba89edcc80490c333/merged",
"UpperDir": "/var/lib/docker/overlay2/36eacbd676e5b7b9518a422833d079a43143185f985d734ba89edcc80490c333/diff",
"WorkDir": "/var/lib/docker/overlay2/36eacbd676e5b7b9518a422833d079a43143185f985d734ba89edcc80490c333/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:78561cef0761903dd2f7d09856150a6d4fb48967a8f113f3e33d79effbf59a07",
"sha256:919a79f49acc05889c76f58a74895fbfcc38b7880411325cd8001003708c3e8a",
"sha256:b77cc451f89a20613ec5c47e6e375b884b7f01b266a61477088519dcc3851a69",
"sha256:fb80465f51cb8cb06cbe0bc9ba6000b1b70d72b0dbcd4d79dd16b636189be15f",
"sha256:473be2d0a2f059fd090da3295ee3bb732e86aeb28611c384df7ae58a44faa8b0",
"sha256:691956aeee0b4a6bfd91b15c881cd7a9a054395d3d800794d04a88f701e8a503",
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
"sha256:2e99cb09399da8783538998bdc6dbea7dccf2beb5d4d77f4ce832a8a5fef79f3"
]
},
"Metadata": {
"LastTagTime": "2024-09-06T14:49:45.036174588+08:00"
}
}