Next.js Discord

Discord Forum

404 in standalone release in docker container

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

41 Replies

it doesnt find any of the resources
and the files are indeed in the container
i can send the dockerfile or any directory setup
for standalone, you need to copy the static+public files to standalone/public for some reason
Answer
@riský for standalone, you need to copy the static+public files to standalone/public for some reason
what? i dont have any public/static files though, i only designed the page with tailwind inline
oh nvm
im stupid
im still getting
the styles are still not being applied
its supposed to be translated
maybe tailwind things are missing?
its like this in container
the css file contains tailwind though
i might have forgot to include the tailwind cfg
yoo it works!!!
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 :)
Awesome
@riský if its solved and node more questions, you can mark this as solved by folowing https://canary.discord.com/channels/752553802359505017/1284393114689212426/1284393125363716208 :)
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
maybe cache
but 4mins is crazy
Just the next build
The container builds quickly locally, but in gh actions its this slow
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
Can it be because it builds on arm arch though
While my local is amd64
@aa55h Can it be because it builds on arm arch though
wait why you arent using default ubuntu runners? why do you need arm?
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
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
@aa55h 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