Equivalent of local host files for running Bluemix containers

When running a docker container locally you can run it with a command like this:

docker run --name some-nginx -v /some/nginx.conf:/etc/nginx/nginx.conf:ro -d nginx

This will use the file /some/nginx.conf in place of /etc/nginx/nginx.conf within your running docker container. This is very handy if you don’t want to permanently enshrine your configuration files inside of an image.

  • Different problems when run in Dockerfile vs. manually. What's gone wrong?
  • Small change in large file in Docker container produces huge layer
  • Docker number of lines in terminal changing inside docker
  • Passing interpolated environment variables in Jenkinsfile
  • About the concurrency of Docker
  • How to change the docker terminal launch script?
  • However, when running Bluemix containers there is no local filesystem as everything is on a remote host. Is there an equivalent option available?

    Without this it seems like the best options are either to build a dedicated image with your configuration or to put the entire configuration as a user provided service. Is this a correct assumption?

  • Where to add client certificates for Docker for Mac?
  • pre-cache node_modules in Docker container
  • DockerFile with private github repo in python requirements.txt
  • Unable to start mesos-slave after adding containerizer setting on slave
  • Docker with two web application containers
  • Docker dm_task_run failed error
  • One Solution collect form web for “Equivalent of local host files for running Bluemix containers”

    You can create a volume and add the configuration files you want to persist on it. The volume is not deleted when a container instance is removed and it can be used by multiple containers.

    To create a volume you can use the following command:

    $ cf ic volume create my_volume

    Then you can create a new container and mount the volume to a path in the container, for example:

    $ cf ic run -v my_volume:/path/to/mount --name my_container my_image

    You can find more details in the following documentation link:


    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.