Build from Dockerfile error. The
VOLUME
keyword is banned in Dockerfiles.
omar-elbaz
HOBBYOP

7 months ago

I'm encountering this error when deploying a service:

The VOLUME keyword is banned in Dockerfiles. Use Railway volumes instead. https://docs.railway.com/reference/volumes

However, my Dockerfile does not contain any VOLUME instructions. I suspect the issue may be coming from a base image that includes a VOLUME directive internally.

It would be really helpful if the error message specified where the VOLUME is being detected whether it’s in my Dockerfile directly or from a parent layer. Right now, it’s unclear how to resolve the issue since my own Dockerfile is clean.

$10 Bounty

2 Replies

Railway
BOT

7 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


brody
EMPLOYEE

7 months ago

Hello,

You have a RAILWAY_DOCKERFILE_PATH=docker-compose.prod.yml service variable.

And within that file exists the word volume.

Please know that we do not support deploying Docker Compose files, so I will open this form up to our community so that they can help you deploy the software you are trying to.

So that the community can better help you, please provide more information on what you are trying to deploy. That Docker Compose file would also be very useful information.

Best,
Brody


Status changed to Awaiting User Response Railway 7 months ago


Loading...