37 questions
0
votes
0
answers
24
views
How to create docker image from layer steps? [duplicate]
I want to know the steps to create the docker image again from the layers mentioned in the docker hub details.
For example :
https://hub.docker.com/layers/apache/spark-py/v3.4.0/images/sha256-...
0
votes
0
answers
48
views
Seggregate app dependencies and project dll in docker build for an aspnet project
On the docker image build samolamplee provided by Microsoft , their is a copy of all build directory in the final image. In case of a large service external dependencies size start to grew and are not ...
2
votes
0
answers
708
views
How to narrow down Docker error message 'Failed to compute size of container rootfs <ID>: mount does not exist`?
For a while now we're encountering error messages in Jenkins build logs Failed to rm container <ID> with no obvious root cause.
Containers which are failing to be removed are started from groovy ...
3
votes
0
answers
495
views
How to split a 60GB docker layer to achieve better performance?
I'm installing AMD/Xilinx Vivado in an Docker image. Even an almost minimal installation is 60 GB in size resulting in a 29GB compressed image. A full installation is something around 150 GB...
The ...
9
votes
0
answers
5k
views
GitHub Action `gha` Docker cache much slower than recreating the image
I set a GitHub actions to build and run tests on my Docker image.
While building the Docker image, a rather heavy file (6Gb model from Huggingface) is being downloaded. (As a side note - I can ...
1
vote
1
answer
67
views
Building an image docker from layers
I have a scenario when I have 2 systems with limited communication - one of them is a stand alone well protected system that not have an internet connection,the only way to make a file transportation ...
0
votes
0
answers
36
views
How to cache a layer manually in Dockerfile [duplicate]
I'm trying to rebuild a docker image, I modified the source code in index.js.
The dockerfile:
FROM node:20
WORKDIR /usr/src/app
COPY . .
RUN npm install
EXPOSE 3000
CMD ["node", "...
0
votes
2
answers
1k
views
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 ...
1
vote
2
answers
337
views
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 ...
-1
votes
4
answers
1k
views
Does the FROM command create a layer and how to check number of layers?
I am reading the official Docker docs, and it is unclear to me how many layers will be created for the below dockerfile.
# syntax=docker/dockerfile:1
FROM ubuntu:18.04
LABEL org.opencontainers.image....
1
vote
1
answer
3k
views
Caching the base docker image for faster pulls
I have a n docker files each corresponding to one image with layers from 1..m common to all of them. The steps specifically includes pulling the base image from a public registry, installing the bare ...
0
votes
0
answers
167
views
Exploring File Fragmentation in Docker Image Storage: An Investigation into Overlay2 Structure and Layered File Saving
When storing docker images in a file system, I want to know if I can intentionally fragment the file into an Overlay2 structure and save it separately in each layer, so I'm trying to run various ...
0
votes
0
answers
879
views
Docker SQL Server image getting large with each docker commit
I have a docker SQL Server image that I configure and then share with team. Each time I update the data the image size increases significantly.
I start with the mcr.microsoft.com/mssql/server:2019-...
-2
votes
2
answers
457
views
How to save Docker image writable
I found out that docker image is read-only.
Is there a way to save the image writable?
The reason why I post this question is because I want to modify the original image.
Delete or Update from the ...
2
votes
1
answer
573
views
How to reduce the docker image size which is already committed
I know that the docker image is read-only. Therefore, deleting the file inside base-image within container does not change the size of docker. (result of docker ps -s)
I wanted to reduce image size, ...
5
votes
0
answers
2k
views
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
...
0
votes
1
answer
605
views
Copy out file tree from Docker layers on Mac OS X
I made some local changes to a Docker container and commited them, and am now trying to replicate them when future instances are built. However, checking which specific changes were made is proving ...
2
votes
0
answers
1k
views
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 ...
2
votes
2
answers
2k
views
Docker failed to pull image no such file or directory
I'm creating a docker image from another image using the most simple docker file:
FROM <source image>
The image builds and tags successfully. However when I push it to an Azure Container ...
0
votes
1
answer
275
views
How to inspect a single layer within a Docker image?
I need to get more information on a single layer -- possibly by the layer id -- such as Created & Last Modified date.
Is there anything similar to docker image inspect for a single layer within a ...
2
votes
2
answers
1k
views
In Dockerfile, does a CMD instruction add a new layer? [duplicate]
I checked many documentation sites and even a book. None of the resources clear this up for me.
The KB from Docker says yes, is it wrong?
https://docs.docker.com/develop/develop-images/dockerfile_best-...
1
vote
0
answers
6k
views
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: ...
0
votes
0
answers
97
views
Remove/Reduce size of docker layers used for installing a software
Can somebody help me?
Sorry for the long question but I'm trying to describe my issue in as much detail as possible.
I'm trying to have a software that installed in my docker image.
In the below ...
1
vote
0
answers
337
views
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)...
1
vote
1
answer
1k
views
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"...
0
votes
0
answers
307
views
Why does CMD Command generate a new layer?
All.
I have one question about Docker Layer images.
I think that RUN, ADD, COPY, CMD commands generate a new layer. However, I wonder why CMD command generates a new layer.
For example, I understand ...
2
votes
2
answers
177
views
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?...
0
votes
0
answers
231
views
Completely delete a Ubuntu based docker container along with underlying layers of MySQL and JDK
I have created custom docker image using Ubuntu 16.04 xenial as base image, and installed JDK-1.8 and MY-SQL layer on it. Following is sample snap-shot of my Dockerfile to create image.
# Use 0.9.19 ...
3
votes
1
answer
2k
views
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 ...
5
votes
2
answers
3k
views
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....
1
vote
2
answers
1k
views
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/...
1
vote
1
answer
207
views
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 ...
1
vote
0
answers
77
views
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:
...
0
votes
0
answers
344
views
Is it possible to "reset" the read/write layer of a Docker container?
While reading about containers and their layers (https://docs.docker.com/storage/storagedriver), it come to my mind the following question:
Is it possible to "reset" the read/write layer of a Docker ...
2
votes
1
answer
2k
views
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 ...
16
votes
5
answers
5k
views
Does Docker EXPOSE make a new layer?
I have been playing around with creating docker files and reading the documentation and I was wondering this question: Does adding an EXPOSE command to my Dockerfile add a layer? (and if it does why ...
3
votes
1
answer
302
views
Does every line in a Dockerfile create a new layer?
I understand the basic concepts of layers, Copy-on-Write (COW), and UnionFS, etc. I keep hearing that
every line in a Dockerfile creates a new layer
So I did some experiments. Here is my Dockerfile:
...