Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker - max depth exceeded

So I am using this example:

https://github.com/mcmoe/mssqldocker

In order to create a SQL Server image and load it with data. I have several sql scripts which I run when I run the container.

However, I started getting this error when building the image:

Step 7/9 : ENTRYPOINT ./entrypoint.sh  ---> Running in c8c654f6a630 max depth exceeded 

I'm not sure how to fix this, I restarted docker and even updated it. I read something about 125 layers? Can anyone explain the cause of this and a potential fix?

I found this command to run:

docker history microsoft/mssql-server-linux:latest | wc -l  312 

My docker-compose yml:

version: "3" services:   mssql:       build: .       image: 'microsoft/mssql-server-linux'       ports:           - '1433:1433'       environment:           - ACCEPT_EULA=Y           - SA_PASSWORD=Abcgfgh123!       volumes:           - db_volume:/var/lib/mssql/data volumes:   db_volume: 
like image 891
user3437721 Avatar asked Nov 13 '17 20:11

user3437721


People also ask

How do you prune docker?

The docker system prune command is a shortcut that prunes images, containers, and networks. Volumes are not pruned by default, and you must specify the --volumes flag for docker system prune to prune volumes. By default, you are prompted to continue. To bypass the prompt, use the -f or --force flag.

How do I remove all images from docker?

Remove all Containers: To remove all containers from the docker-machine, we need to get the ids of all the containers. We can simply get the ids of the containers with the command docker ps -aq, then by using the docker rm command, we can remove all the containers in the docker-machine.

What is the purpose of docker?

Docker is a software platform that allows you to build, test, and deploy applications quickly. Docker packages software into standardized units called containers that have everything the software needs to run including libraries, system tools, code, and runtime.


1 Answers

The image parameter for a service in a docker-compose.yml definition has dual meanings depending on the existence of a build parameter.

  • If there is no build stanza, The image will just be pulled and run.

  • If you have a build stanza, image will be the name your built image is tagged as, and run.

By naming the built image microsoft/mssql-server-linux, which is the same as the FROM microsoft/mssql-server-linux image. Docker was layering the build on top of itself each time.

The original build started on the "official" microsoft/mssql-server-linux but then each subsequent build would start from your local microsoft/mssql-server-linux image which had been appended to, until eventually you hit the maximum number of layers for your storage driver.

Use your own namespace for all images you build:

version: "3" services:   mssql:       build: .       image: 'user3437721/mssql-server-linux' 
like image 90
Matt Avatar answered Sep 21 '22 16:09

Matt