Clear dockerfile cache
Hi, I was trying to integrate sleep command before running the source for the internal DNS Resolver to setup. But it seems like it's still using the cached
CMD
command instead of the newly replaced ENTRYPOINT
. Any ways to clear the cache?17 Replies
Project ID:
3659376b-b6c0-4169-88c9-8fe089930585
more often than not this isnt a cahing issue, are you sure you dont have the start command set elsewhere?
Nowhere else other than after the sleep
Can also confirm it's not executing the
runner.sh
since the log did not echo the message.what is getting printed then?
Just the
npm start
logs as if I were using the old dockerfilecan you check to make sure you don't have a start command set in the service settings, a railway.json or a Procfile, or even an environment variable that sets the start command
Just confirmed start cmd is empty. I don't have any railway/Procfile config or env that touches startup param.
are you deploying from the correct branch?
yup, all changes are merged into main before being pull by railway.
try that
and i see youre using alpine, so please read this https://docs.railway.app/reference/private-networking#workaround-for-alpine-based-images
weird, just found out that it wasn't using dockerfile at all, instead it was using
Nixpacks
dockerfiles need a capital D
also, thats a good segway, why not just use nixpacks?
I would, but the internal network delay breaks the db connections.
yes so you do the sleep 3 thing
Solution
"start": "sleep 3 && <regular start command here>"
Got it working, thanks again!
no problem!