Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to pass parameters to push and run Docker images #101

Closed
nabiltntn opened this issue Sep 19, 2017 · 5 comments
Closed

How to pass parameters to push and run Docker images #101

nabiltntn opened this issue Sep 19, 2017 · 5 comments
Labels

Comments

@nabiltntn
Copy link

Hi,

I can't see in documentation how it's possible to pass parameters to run Dockee image like -p or
-e.

Is it possible to use them ?

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/151213624

The labels on this github issue will be updated when the story is started.

@dkoper
Copy link
Contributor

dkoper commented Oct 2, 2017

Hi @nabiltntn

I assume you are referring to pushing a Docker app and want to set environment variables for the app?
You can either push the app with an app manifest file that declares the environment variables, or push your Docker app first (with cf push APP -o IMAGE) followed by cf set-env for each environment variable you want to set.

@weibeld
Copy link

weibeld commented Apr 19, 2018

@dkoper if I run

cf push APP -o IMAGE
cf set-env APP VAR value

can't it be that the Docker container is already started without the variable VAR?

Is it necessary to run cf restage APP after cf set-env, like this?

cf push APP -o IMAGE
cf set-env APP VAR value
cf restage APP

@cheahkhing
Copy link

Hi, any reason this is closed? is this supported?

I am looking for ways to push and run docker images with parameters like: -v "xxx:ccc" to mount certain volumes.

Is this doable?

@loafoe
Copy link

loafoe commented Nov 13, 2019

@cheahkhing typically not. Your CF deployment would need to support volume services. See here for details:

https://docs.cloudfoundry.org/devguide/services/using-vol-services.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants