Next.js Discord

Discord Forum

404 in standalone release in docker container

Answered
Clumber Spaniel posted this in #help-forum
Open in Discord
Avatar
Clumber SpanielOP
any idea why can i be getting htis?
Image
Answered by risky
for standalone, you need to copy the static+public files to standalone/public for some reason
View full answer

41 Replies

Avatar
Clumber SpanielOP
it doesnt find any of the resources
and the files are indeed in the container
Image
i can send the dockerfile or any directory setup
Avatar
for standalone, you need to copy the static+public files to standalone/public for some reason
Answer
Avatar
Clumber SpanielOP
what? i dont have any public/static files though, i only designed the page with tailwind inline
Avatar
Clumber SpanielOP
oh nvm
im stupid
Avatar
Clumber SpanielOP
im still getting
Image
the styles are still not being applied
Image
its supposed to be translated
Image
maybe tailwind things are missing?
its like this in container
Image
the css file contains tailwind though
i might have forgot to include the tailwind cfg
Avatar
Clumber SpanielOP
yoo it works!!!
Avatar
yay contratz!
if its solved and node more questions, you can mark this as solved by folowing https://canary.discord.com/channels/752553802359505017/1284393114689212426/1284393125363716208 :)
Avatar
Clumber SpanielOP
Awesome
I actually have one more question, the build takes a few seconds on pc, but in gh action in docker container, it takes a lot of time, any idea why?
Like 4 mins
Avatar
maybe cache
but 4mins is crazy
also when you say 4 mins, is that just build, or total like install packages?
Avatar
Clumber SpanielOP
Just the next build
The container builds quickly locally, but in gh actions its this slow
Avatar
id say try to cache .next/cache if not already but maybe you just have a really beefy local
gh actions have always been faster then my laptop tho
Avatar
Clumber SpanielOP
Can it be because it builds on arm arch though
While my local is amd64
Avatar
wait why you arent using default ubuntu runners? why do you need arm?
Avatar
Clumber SpanielOP
Oh no the docker container has platform set to arm
See here
You can also take a look at the logs
The project is only a few pages though
Avatar
yeah your app seems so basic
if you just run build outside docker, how fast is it?
like maybe it is making one core or something sad
@Clumber Spaniel oh btw i forgot about it, but they have a "recomended" docker build: <https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile