Docker build time is too big
i have 3 services in docker compose that depends_on each other, here is my docker compose file:
but when i hit the command docker compose build, all of these 3 services don't build sequentially after i updated docker to 4.43.1, the build time is very big, does anyone know why that happens?

99 Replies
have you tried building these services in order of their dependencies to diagnose which one might be causing slowdowns?
no...
well, that's an easy place to start
but before i updated my docker desktop, the 3 services is built from admin, after it finished the build, then
api-animuvn-info
started, then animuvn-info
started at the lastand? it's probably still building the same way but with different console output
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
i don't understand, i just hit
docker compose build
, before updated it happened like i said above, now all of these services run the build simultaneouslyUnknown User•2mo ago
Message Not Public
Sign In & Join Server To View
no.... i did the
docker compose build
hundred times, there's no postgre or nginx pullUnknown User•2mo ago
Message Not Public
Sign In & Join Server To View
the point i want to say is 3 services run the build simultaneously at version 4.43.1, before this version (im not sure) they run sequentially, i hit that command so many times
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
i'm not sure what point you're trying to make
so maybe try what teb or i have suggested to diagnose what changed (or broke) instead of continuing to reference past behavior....?
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
:sadge:
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
:sadge:
^ with just a compose file and one screenshot of a running build with 0 logs, there's nothing we can suggest besides 'try getting logs and/or building differently'
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
the dockerfile is just some commands to build, restore, publish, why its important
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
bro your dockerfile is what's being used when you run
docker compose build
so uh, yeah, it does the heavy lifting in this situationUnknown User•2mo ago
Message Not Public
Sign In & Join Server To View
can probably get logs without a full prune as well, just try building the services individually and see what happens (with that progress flag)
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
one of my dockerfile
there nothing other than build command
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
assuming he actually ran
docker compose build
, there is no reason for services to come upUnknown User•2mo ago
Message Not Public
Sign In & Join Server To View
it's just creating and tagging images, not starting containers
:sadge: please wait me reinstall docker desktop, then you can understand what the point
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
you don't need docker desktop
for the sake of me and tebs sanity, run a build with that progress flag
we could have logs by now lol
its running, how to send

copy from your console if it gets stuck for a while
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
or re-run the build and pipe it to a text file that you can easily copy / paste from
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
then wait me around 25mins
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
:kekw: oops
i forgot
i have to go to sleep after 25mins
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
yeah, i see all of them are run in parallel
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
PS D:\AnimeVnInfo> docker compose build --progress=plain | logs.txt
logs.txt : The term 'logs.txt' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:41
+ docker compose build --progress=plain | logs.txt
+ ~~~~
+ CategoryInfo : ObjectNotFound: (logs.txt:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
oh no
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
yeah, running now
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
:kekw: but i can't wait till it finish, i have to go to sleep now, it's 23:35 here
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
https://devblogs.microsoft.com/powershell-community/how-to-send-output-to-a-file/
rather slow, but google is also your friend
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View
it should, but figured i'd throw in the 'powershell' way of doing things too
whoa, this still not done yet, i need to run the build again

or check if the log file has logs in it
and if it does, send them
i created new logs file here, this is at version 4.43.1
version 4.33.1 one
this is log file that i cancelled, i dont understand why it stuck
you can see both version 4.33 and 4.43 are super different
well it looks like
animuvn-info
gets stuck loading its build contextstuck for 8 hours, no way
it's what the logs show ¯\_(ツ)_/¯
towards the end of your log file it's sent nearly 3gb of 'build context' to the docker daemon
what, i dont know it's transferring to where
....to the docker daemon, like i just said
:kekw: okay, let me google what is docker daemon
the actual docker service running on your pc
that hosts the images
and runs containers
compose is just a CLI tool, it has to send info to the docker service on your PC to do anything
okay, nvm, but as i said
the build runs simultaneously at version 4.43.1
i don't care
this makes slow the build
i am diagnosing your build issues
i don't care how docker behaved previously
what is the size of your
AnimeVnInfoFrontend
folder?included
node_modules
?yes

yeah, i'm guessing that's your issue
are you using a
.dockerignore
to prevent it from sending unneeded files to the daemon?
what kind of front end is this?
i place it at same folder with docker-compose file
i assume something unintended is happening with the dockerignore you have and extra stuff is being sent
https://stackoverflow.com/questions/38946683/how-to-test-dockerignore-file
you might be able to use some of the suggestions here to test it and see
i think it works
because i saw my images size is small

not everything in the build context is copied into the image
it's just the build context
this is at my hub

show your dockerfile
what kind of frontend are you using?
nextjs
so react
so is's transfering to daemon at
COPY . .
?dude it transfers everything in the build folder that isn't ignored by your
.dockerignore
to the daemon
that is what i keep trying to tell you
your logs show that is has transferred nearly 3gb of context, which is a lotyeah
i checked my WSL disk
over 35GB
just only one run
so i would assume there's something going on with your dockerignore
so it should be place at where?
looking at your 4.33.1 logs, you can see the context is much smaller
yeah, because i reinstall the docker
is english your second language or something?
i feel like there is a language barrier
it's not my mother language
sometims i need google translate
4.33.1 context size: 652.97kB
4.43 context size: 2.6GB+
something is causing docker to mess up its build context in 4.43
can you explain what it is transferring?
at version 4.33
no, this is backend, net core api