Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build stucks on FROM --platform=linux/amd64 node:current-alpine image #2075

Open
arensade opened this issue Apr 30, 2024 · 4 comments

Comments

@arensade
Copy link

arensade commented Apr 30, 2024

Environment

  • Platform: MacOS M1 Sonoma 14.4.1
  • Docker Version: 4.29.0
  • Node.js Version: platform=linux/amd64 node:current-alpine
  • Image Tag: current-alpine

Expected Behavior

after RUN cmd run build it should goes to push the layer into Remote repo.

Current Behavior

Docker stucks on

RUN npm run build

Possible Solution

Steps to Reproduce

FROM --platform=linux/amd64 node:current-alpine

WORKDIR /app

COPY package.json ./

RUN npm install

COPY . .

EXPOSE 80

RUN npm run build

CMD [ "node", "index.js"]
@LaurentGoderre
Copy link
Member

This has more to do about the script being run by the build command than this image. What is your build command running?

@arensade
Copy link
Author

RUN npm run build
just build qwik js application that works well on all node version expect --platform=linux/amd64.
I just test in on at least node:22 node:18 and node:current-alpine but when I add platform its stucks on build layer.

@LaurentGoderre
Copy link
Member

What's the output of the build? It's possible it's building the app for the wrong architecture.

@GabrielBragaGit
Copy link

After trying a million alternatives, what magically resolved for me was swapping npm for yarn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants