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 execute docker run instructions? #24

Open
kunal394 opened this issue Jun 24, 2016 · 2 comments
Open

How to execute docker run instructions? #24

kunal394 opened this issue Jun 24, 2016 · 2 comments

Comments

@kunal394
Copy link

kunal394 commented Jun 24, 2016

Say I run my docker image named sample-image using this command:

docker run -dti --name=sample-image -u=0 --pid=host --net=host --uts=host --privileged=true -p 9279:9279 -v /tmp:/tmp:rw --entrypoint=/entrypoint.sh -e LISTEN_PORT=80 -e PROTOCOL=http -e BACKEND_IP=127.0.0.1 -e BACKEND_PORT=9100 sample-image -a 40.23.123.75

Now I am not able to understand how to exactly run my docker image with docker-slim with all these arguments, so please explain how to do that!

Thanks

@kcq
Copy link
Member

kcq commented Jun 25, 2016

The 'build' command in docker-slim has a number of optional parameters to cover these 'docker run' options...

The '--mount' option is like the '-v' option you have in the example.
The '--entrypoint' option is identical to the '--entrypoint' in 'docker run'.
The '--cmd' option is used to pass the command line parameters you pass at the end of the 'docker run' command.

'docker-slim build' also has a few extra options ('--env', '--workdir', and '--expose'), but they are not used yet. Any contributions will be greatly appreciated here!

@davidlt
Copy link

davidlt commented Jun 3, 2017

I hit the same issue as I need to pass --net=host to get working internet connectivity in the container.

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

No branches or pull requests

3 participants