Deploy pre-built docker image with a filesystem mount?

I am attempting to utilize a pre-built docker image but the application expects /app/data to be mounted on the host file system. Is that possible with Koyeb?

How I would do this with the docker CLI is something like:

docker run -v /local/path:/app/data mydocker/image:tag
1 Like

Hello Eric!

It is not possible to mount a custom volume inside your container, as we do not provide persistent storage yet.

I assume the issue is the image mydocker/image:tag expects the parameter /app/data to exist, and if not, it fails to start. If it’s the case, then you can create another Dockerfile with the following content:

FROM mydocker/image:tag

RUN mkdir /app/data

The application should start. However, this should only be used for testing purpose: if your application is restarted, or rescheduled for internal maintenance, then you will lose the data.

Is there any plan to support mounting volumes for Docker container?

1 Like

Hi @Lawrence_Li ,
We are planning to add block storage in the future, feel free to add your vote to this feature request:

What is your use case?

1 Like