-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Open
Labels
area/distributionImage DistributionImage Distributionkind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.
Description
I crafted a manifest as follows:
{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"config": {
"digest": "sha256:b165ead81ec88bf2f422408012b5559e3007a4e8b3c31e7e67a5caf8ba763b57",
"mediaType": "application/vnd.docker.container.image.v1+json",
"size": 4258
}
}The config is the following:
{"architecture":"amd64","config":{"Hostname":"fd645bd7790b","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","REDIS_VERSION=3.2.3","REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-3.2.3.tar.gz","REDIS_DOWNLOAD_SHA1=92d6d93ef2efc91e595c8bf578bf72baff397507"],"Cmd":["redis-server"],"ArgsEscaped":true,"Image":"sha256:7ef2f894e3b351194185d3d1db30f71dd3ce9204871209e521c43edd6fdf602e","Volumes":{"/data":{}},"WorkingDir":"/data","Entrypoint":["docker-entrypoint.sh"],"OnBuild":[],"Labels":{}},"container":"38a806a0fbb20231e23e6fae3f3a6077b8006460aa9cec1f22587484bf7e0c3e","container_config":{"Hostname":"fd645bd7790b","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","REDIS_VERSION=3.2.3","REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-3.2.3.tar.gz","REDIS_DOWNLOAD_SHA1=92d6d93ef2efc91e595c8bf578bf72baff397507"],"Cmd":["/bin/sh","-c","#(nop) ","CMD [\"redis-server\"]"],"ArgsEscaped":true,"Image":"sha256:7ef2f894e3b351194185d3d1db30f71dd3ce9204871209e521c43edd6fdf602e","Volumes":{"/data":{}},"WorkingDir":"/data","Entrypoint":["docker-entrypoint.sh"],"OnBuild":[],"Labels":{}},"created":"2016-08-30T17:42:24.129802294Z","docker_version":"1.12.1","history":[{"created":"2016-08-29T23:49:14.472330203Z","created_by":"/bin/sh -c #(nop) ADD file:852e9d0cb9d906535af512a89339fc70b2873a0f94defbcbe41cd44942dd6ac8 in / "},{"created":"2016-08-30T17:38:59.23804892Z","created_by":"/bin/sh -c addgroup -S redis \u0026\u0026 adduser -S -G redis redis"},{"created":"2016-08-30T17:39:00.550567545Z","created_by":"/bin/sh -c apk add --no-cache 'su-exec\u003e=0.2'"},{"created":"2016-08-30T17:41:40.461777661Z","created_by":"/bin/sh -c #(nop) ENV REDIS_VERSION=3.2.3","empty_layer":true},{"created":"2016-08-30T17:41:40.705889172Z","created_by":"/bin/sh -c #(nop) ENV REDIS_DOWNLOAD_URL=http://download.redis.io/releases/redis-3.2.3.tar.gz","empty_layer":true},{"created":"2016-08-30T17:41:40.917786385Z","created_by":"/bin/sh -c #(nop) ENV REDIS_DOWNLOAD_SHA1=92d6d93ef2efc91e595c8bf578bf72baff397507","empty_layer":true},{"created":"2016-08-30T17:42:21.762816759Z","created_by":"/bin/sh -c set -ex \t\t\u0026\u0026 apk add --no-cache --virtual .build-deps \t\tgcc \t\tlinux-headers \t\tmake \t\tmusl-dev \t\ttar \t\t\u0026\u0026 wget -O redis.tar.gz \"$REDIS_DOWNLOAD_URL\" \t\u0026\u0026 echo \"$REDIS_DOWNLOAD_SHA1 *redis.tar.gz\" | sha1sum -c - \t\u0026\u0026 mkdir -p /usr/src/redis \t\u0026\u0026 tar -xzf redis.tar.gz -C /usr/src/redis --strip-components=1 \t\u0026\u0026 rm redis.tar.gz \t\t\u0026\u0026 grep -q '^#define CONFIG_DEFAULT_PROTECTED_MODE 1$' /usr/src/redis/src/server.h \t\u0026\u0026 sed -ri 's!^(#define CONFIG_DEFAULT_PROTECTED_MODE) 1$!\\1 0!' /usr/src/redis/src/server.h \t\u0026\u0026 grep -q '^#define CONFIG_DEFAULT_PROTECTED_MODE 0$' /usr/src/redis/src/server.h \t\t\u0026\u0026 make -C /usr/src/redis \t\u0026\u0026 make -C /usr/src/redis install \t\t\u0026\u0026 rm -r /usr/src/redis \t\t\u0026\u0026 apk del .build-deps"},{"created":"2016-08-30T17:42:22.585916004Z","created_by":"/bin/sh -c mkdir /data \u0026\u0026 chown redis:redis /data"},{"created":"2016-08-30T17:42:22.82983244Z","created_by":"/bin/sh -c #(nop) VOLUME [/data]","empty_layer":true},{"created":"2016-08-30T17:42:23.093855601Z","created_by":"/bin/sh -c #(nop) WORKDIR /data","empty_layer":true},{"created":"2016-08-30T17:42:23.406028597Z","created_by":"/bin/sh -c #(nop) COPY file:9b596974f478088dc2d2bf2906046f6c8872ecff3c716abd89850fd50ec90c47 in /usr/local/bin/ "},{"created":"2016-08-30T17:42:23.65382703Z","created_by":"/bin/sh -c #(nop) ENTRYPOINT [\"docker-entrypoint.sh\"]","empty_layer":true},{"created":"2016-08-30T17:42:23.893736721Z","created_by":"/bin/sh -c #(nop) EXPOSE 6379/tcp","empty_layer":true},{"created":"2016-08-30T17:42:24.129802294Z","created_by":"/bin/sh -c #(nop) CMD [\"redis-server\"]","empty_layer":true}],"os":"linux"}Note that the rootfs property has been removed.
The contents of the image config don't really matter. After pushing this to a registry, we would expect an error when pulling. Instead, we get the following:
$ docker pull localhost:5000/redis:layerless
layerless: Pulling from redis
This should either:
- Create an image with an empty root filesystem, since there are no layers.
- Error out on missing layers.
@crosbymichael @aaronlehmann @tonistiigi
Edit: added image configuration.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/distributionImage DistributionImage Distributionkind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.