S
SolidJSā€¢14mo 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ā€¢14mo ago
I just run node dist/server.js in my docker setup and it works well.
the magic guy
the magic guyā€¢14mo ago
but you gotta build the first right?
Some Call Me Tim
Some Call Me Timā€¢14mo ago
oooh, you're building in the container yeah
the magic guy
the magic guyā€¢14mo ago
you are not?
Some Call Me Tim
Some Call Me Timā€¢14mo ago
yeah, I do, but it builds okay. misread your OP šŸ˜
the magic guy
the magic guyā€¢14mo ago
hmmm what node image are you using?
Some Call Me Tim
Some Call Me Timā€¢14mo ago
node:18.16-alpine
the magic guy
the magic guyā€¢14mo 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ā€¢14mo 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 guyā€¢14mo ago
like 300s before I kill it
Some Call Me Tim
Some Call Me Timā€¢14mo ago
oh yeah, mine takes like 10 minutes
the magic guy
the magic guyā€¢14mo ago
it takes like 2 seconds building it locally tho... is solid-start really that heavy?
Some Call Me Tim
Some Call Me Timā€¢14mo ago
no, but docker ARM -> AMD64 emulation is slow as shit are you on an ARM chip?
the magic guy
the magic guyā€¢14mo ago
the magic guy
the magic guyā€¢14mo ago
uhh good question. I got no idea lol
Want results from more Discord servers?
Add your server