Questions tagged [docker-layer]

A docker layer, or image layer, is a change on a docker image. Each docker image may contain a series of docker layers. Docker makes use of union file systems to combine all these layers into a single image. Union file systems allow files and directories of separate file systems, known as branches, to be transparently overlaid, forming a single coherent file system.

30 questions
4
votes
0 answers

Docker ignore file for multistage build

I need to exclude file in Docker COPY for the first stage but use it in another COPY for the second stage, because it breaks docker layer caching. My folder structure looks like: src/ public/ .env package.json nginx.conf My Dockerfile looks like…
Nick Roz
  • 3,918
  • 2
  • 36
  • 57
3
votes
1 answer

Layers between docker builds can't be shared

I want to reuse the layers from a docker image on two different machines in the following way: Build image (1) Push image to registry (1) Pull image from registry (2) Build same docker image and reuse layers from pulled image…
3
votes
2 answers

Does number of layers have implication on size, setup time or performance of current and future docker images?

Assuming I have 2 options to add docker layers. Option1: RUN python -m nltk.downloader punkt averaged_perceptron_tagger brown Option2: RUN python -m nltk.downloader punkt RUN python -m nltk.downloader brown RUN python -m nltk.downloader…
variable
  • 8,262
  • 9
  • 95
  • 215
2
votes
0 answers

Docker: "too many levels of symbolic links"

i've been trying to install btcpay-server via my umbrel node. I ssh-ed into the server and pulled the docker image for btcpay-server. On doing so, docker was unable to install the postgres layer and gave me this error: ERROR: for postgres failed to…
ParmuTownley
  • 957
  • 2
  • 14
  • 34
2
votes
2 answers

Docker Image and it's Kubernetes Pod differ

I modified the contents in my Docker-Image and ran it's Kubernetes Pod. However, the Kubernetes Pod had the contents of the old version of the Docker Image and not the Modified One. How is it possible? I am guessing that the K8s worker node is…
1
vote
0 answers

Docker Compose Return Message ERROR: failed to register layer: ApplyLayer exit status 1 stdout: stderr: remount /, flags: 0x84000: permission denied

i pull docker image and create container using docker-compose, after running the command docker-compose up i got message ERROR: failed to register layer: ApplyLayer exit status 1 stdout: stderr: remount /, flags: 0x84000: permission denied. why…
harmain
  • 188
  • 1
  • 9
1
vote
0 answers

How can I build each part of a multi-stage Docker build without using cached layers, but using cache from previous stages

I've got a 4 stage Dockerfile, show below, however I can't quite work out the best way to optimise the build when I don't want to use the cache (to ensure that the latest images, and packages are used)… FROM composer:latest as…
TobyG
  • 1,692
  • 3
  • 21
  • 36
1
vote
1 answer

Why is a parent container image SHA not listed in the layers of the child?

Consider a container image, lets call it BaseContainerImage. I build this container image based off a container image on docker hub (the .Net Core 3.1 runtime if it matters). By "based off" I mean that the FROM references that docker hub…
Vaccano
  • 78,325
  • 149
  • 468
  • 850
1
vote
2 answers

Tell Docker build to ignore change of order of RUN commands

Say we have this: RUN go get 'github.com/foo/one' RUN go get 'github.com/foo/two' RUN go get 'github.com/foo/three' and we change the order: RUN go get 'github.com/foo/two' RUN go get 'github.com/foo/three' RUN go get 'github.com/foo/one' the…
user12374570
1
vote
1 answer

Docker image layer verification

I need to know about offline usage of a registry for docker images. When a docker image is pulled from the official microsoft site, adjusted, and then pushed to a registry, is it the complete image or are layers missing? When other hosts pull the…
kvirk
  • 97
  • 1
  • 10
1
vote
0 answers

Docker save image difference

I'm deploying my application using Docker. But I have some clients that doesn't allow me connect to any docker repository, for security reason. To do the deploy, I'm saving all my images in a file: docker save -o deploy.docker image-1…
Victor
  • 8,309
  • 14
  • 80
  • 129
1
vote
1 answer

Can I obtain the Docker layer history on non-final stage Docker builds?

I'm working out a way to do Docker layer caching in CircleCI, and I've got a working solution. However, I am trying to improve it. The problem in any form of CI is that the image history is wiped for every build, so one needs to work out what files…
halfer
  • 19,824
  • 17
  • 99
  • 186
0
votes
2 answers

Is docker caching useless when RUN is involved?

Consider this example from the docs: # syntax=docker/dockerfile:1 FROM node WORKDIR /app COPY package.json yarn.lock . # Copy package management files RUN npm install # Install dependencies COPY . . #…
IndustryUser1942
  • 1,052
  • 1
  • 8
  • 12
0
votes
2 answers

Reusing individual layers across images even from registry

Since docker layers are just filesystems is it possible to reuse a specific layer directly outside of cache build. I mean imagesA has some layers that are layers that can be used by imageX. Is such a sharing/reuse even possible?
Jim
  • 3,845
  • 3
  • 22
  • 47
0
votes
2 answers

Are docker layers a runtime execution instruction?

I am trying to understand the docker images a bit better. Most of the instructions in a dockerfile creates a layer. So when we have the command: COPY hom* /mydir/ this creates a layer and according to the doc The COPY instruction copies new files…
Jim
  • 3,845
  • 3
  • 22
  • 47
1
2