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•2y ago
I just run node dist/server.js in my docker setup and it works well.
the magic guy
the magic guyOP•2y ago
but you gotta build the first right?
Some Call Me Tim
Some Call Me Tim•2y ago
oooh, you're building in the container yeah
the magic guy
the magic guyOP•2y ago
you are not?
Some Call Me Tim
Some Call Me Tim•2y ago
yeah, I do, but it builds okay. misread your OP 😐
the magic guy
the magic guyOP•2y ago
hmmm what node image are you using?
Some Call Me Tim
Some Call Me Tim•2y ago
node:18.16-alpine
the magic guy
the magic guyOP•2y 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•2y 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•2y ago
like 300s before I kill it
Some Call Me Tim
Some Call Me Tim•2y ago
oh yeah, mine takes like 10 minutes
the magic guy
the magic guyOP•2y ago
it takes like 2 seconds building it locally tho... is solid-start really that heavy?
Some Call Me Tim
Some Call Me Tim•2y ago
no, but docker ARM -> AMD64 emulation is slow as shit are you on an ARM chip?
the magic guy
the magic guyOP•2y ago
the magic guy
the magic guyOP•2y ago
uhh good question. I got no idea lol
Some Call Me Tim
Some Call Me Tim•2y ago
what kind of computer are you typing on šŸ™‚ better yet, what operating system are you on
the magic guy
the magic guyOP•2y ago
linux
Some Call Me Tim
Some Call Me Tim•2y ago
ahhh, so probably not a mac then
the magic guy
the magic guyOP•2y ago
nah
Some Call Me Tim
Some Call Me Tim•2y ago
so probalby i386 so that isn't the issue then
the magic guy
the magic guyOP•2y 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•2y ago
i don't think so? dunno for sure though
the magic guy
the magic guyOP•2y 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•2y 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•2y ago
ugh....
the magic guy
the magic guyOP•2y ago
bruh still going... šŸ’€
the magic guy
the magic guyOP•2y 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•2y 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•2y ago
you are running ssr: false right?
the magic guy
the magic guyOP•2y ago
yes
Some Call Me Tim
Some Call Me Tim•2y ago
pffft amateur šŸ˜‰
the magic guy
the magic guyOP•2y ago
lmfaoo you win
Some Call Me Tim
Some Call Me Tim•2y ago
ya man, but it's bitter sweet being the winner of a loser contest

Did you find this page helpful?