DockerFile fails to install packages with yarn install and doesn't generate node_modules
This is my DockerFile Also how can I run the DockerFile with no cache?
19 Replies
Project ID:
80aa096c-5a05-4e03-9772-a48238f8ffa9
80aa096c-5a05-4e03-9772-a48238f8ffa9
I need to install ICU library that's the only reason why I'm using DockerFile
you have a multi stage dockerfile but you aren't copying the node_modules from the first stage into the second stage, I'd recommend for simplicity, do a single stage dockerfile, or at least get a single stage dockerfile working before you worry worry about optimizations like that
Hey Bordy thanks for replying. This was my initial DockerFile
yes this one looks much better, what where the difficulties you faced with this?
the same error as the screenshot
yarn build would fail
can you send a screenshot of your github repo?
can you build with your dockerfile locally?
yes
I had this project deployed to railway before without the DockerFile and everything worked perfectly, I'm only using the DockerFile because I need to install the ICU library
if there's a way to install the ICU library without using the DockerFile please let me know
I created a nixpacks.toml >
Would this do it?
thank you, I'll try that and I'll let you know
I really appreciate the help @Brody
of course š
Hey @Brody the solution worked but it didn't work for my case. I need to install a binary util called "cputil" and it can't be install with apt-get. I'm trying to do with a DockerFile again which looks like this
Now when i push to my github, railway starts building but it's not recognizing my DockerFile
make sure the it's named
Dockerfile
and in the root of your repoHey @Brody I'm running into the same problem as earlier where yarn build command doesn't work "#15 1.262 Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)
#15 1.262
#15 1.262 $ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...
#15 ERROR: process "/bin/sh -c yarn run build" did not complete successfully: exit code: 1
-----"
Hey @Brody how does this look to you. I need this cputil to be executable in my server. But when i try to use it in production in my node js server it says that the command doesn't exist
@Brody if you have any ideas, can you please help me. I've been stuck on this for 3 days now
i honestly have no clue, it looks fine to me