S
SolidJSā€¢16mo ago
the magic guy

solid start `npm run build` hangs in docker container

Trying to dockerize a solid application, built from solid start. It seems to hang at npm run build step, at solid-start rendering index.html.... Here is the docker file im using
FROM node:alpine3.18 AS build
COPY package* .
RUN npm ci

COPY . .

ENV DOCKER=true
RUN npm run build
CMD ["npm", "run", "start"]
FROM node:alpine3.18 AS build
COPY package* .
RUN npm ci

COPY . .

ENV DOCKER=true
RUN npm run build
CMD ["npm", "run", "start"]
33 Replies
Some Call Me Tim
Some Call Me Timā€¢16mo ago
I just run node dist/server.js in my docker setup and it works well.
the magic guy
the magic guyOPā€¢16mo ago
but you gotta build the first right?
Some Call Me Tim
Some Call Me Timā€¢16mo ago
oooh, you're building in the container yeah
the magic guy
the magic guyOPā€¢16mo ago
you are not?
Some Call Me Tim
Some Call Me Timā€¢16mo ago
yeah, I do, but it builds okay. misread your OP šŸ˜
the magic guy
the magic guyOPā€¢16mo ago
hmmm what node image are you using?
Some Call Me Tim
Some Call Me Timā€¢16mo ago
node:18.16-alpine
the magic guy
the magic guyOPā€¢16mo ago
idk why mine wont build.... šŸ˜­ let me try that ig. Idk if it would make a difference
Some Call Me Tim
Some Call Me Timā€¢16mo ago
Mine takes ages to build as I'm on a M2 MBP, how long have you let it sit there?
the magic guy
the magic guyOPā€¢16mo ago
like 300s before I kill it
Some Call Me Tim
Some Call Me Timā€¢16mo ago
oh yeah, mine takes like 10 minutes
the magic guy
the magic guyOPā€¢16mo ago
it takes like 2 seconds building it locally tho... is solid-start really that heavy?
Some Call Me Tim
Some Call Me Timā€¢16mo ago
no, but docker ARM -> AMD64 emulation is slow as shit are you on an ARM chip?
the magic guy
the magic guyOPā€¢16mo ago
the magic guy
the magic guyOPā€¢16mo ago
uhh good question. I got no idea lol
Some Call Me Tim
Some Call Me Timā€¢16mo ago
what kind of computer are you typing on šŸ™‚ better yet, what operating system are you on
the magic guy
the magic guyOPā€¢16mo ago
linux
Some Call Me Tim
Some Call Me Timā€¢16mo ago
ahhh, so probably not a mac then
the magic guy
the magic guyOPā€¢16mo ago
nah
Some Call Me Tim
Some Call Me Timā€¢16mo ago
so probalby i386 so that isn't the issue then
the magic guy
the magic guyOPā€¢16mo ago
does solid start need any system dependencies? I dont see any mentions of it in the docs or the interweebs
Some Call Me Tim
Some Call Me Timā€¢16mo ago
i don't think so? dunno for sure though
the magic guy
the magic guyOPā€¢16mo ago
hmm using node:18.16-alpine didnt seem to change much... Theres no reason building a js app should take 10 mins....
Some Call Me Tim
Some Call Me Timā€¢16mo ago
it's the downside of using emulation to compile but the upside of this stupidly fast M2 chip outweighs that
the magic guy
the magic guyOPā€¢16mo ago
ugh....
the magic guy
the magic guyOPā€¢16mo ago
bruh still going... šŸ’€
the magic guy
the magic guyOPā€¢16mo ago
huh found this issue. Also upgraded to node 20, didnt change anything tho... @ryansolid is there a flag of some sort we can turn on for more debugging logs? The issue mentions of this idea, wondering if it ever became anything. https://github.com/solidjs/solid-start/issues/406
GitHub
build problem in docker Ā· Issue #406 Ā· solidjs/solid-start
A lot of time passes but nothing happens
the magic guy
the magic guyOPā€¢16mo ago
lol, changed to node:20 instead of the alpine image the issue went away weird tho... ig its got something to do with system dependencies @timothyallan fixed the issue if you are curious lol....
ryansolid
ryansolidā€¢16mo ago
you are running ssr: false right?
the magic guy
the magic guyOPā€¢16mo ago
yes
Some Call Me Tim
Some Call Me Timā€¢16mo ago
pffft amateur šŸ˜‰
the magic guy
the magic guyOPā€¢16mo ago
lmfaoo you win
Some Call Me Tim
Some Call Me Timā€¢16mo ago
ya man, but it's bitter sweet being the winner of a loser contest
Want results from more Discord servers?
Add your server