testing - Add a link to docker run -




i making test file. need have docker image , run this: docker run www.google.com

everytime url changes, need pass file inside docker. possible?

sure. need custom docker image possible.

let's want execute command "ping -c 3" , pass parameter send in command line.

you can build custom image following dockerfile:

from alpine:latest copy entrypoint.sh /entrypoint.sh run chmod +x /entrypoint.sh entrypoint /entrypoint.sh 

the entrypoint.sh file contains following:

#!/bin/sh ping -c 3 "$website" 

then, have build image running:

docker build -t pinger . 

now, can run image command:

docker run --rm -e website=www.google.com pinger 

by changing value of website env variable in latest step can requested.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -