0

I start

docker run --rm -it -v $(pwd):/data -p 8080:80 klokantech/tileserver-gl --verbose 

I took this in a Dockerfile:

FROM klokantech/tileserver-gl:v2.2.0 ADD . /data 

But how can I call the klokantech/tileserver-gl option "--verbose" in Dockerfile?

1

2 Answers 2

1

If your option "--verbose" is static then you have to add it as ENV in dockerfile,

else if you options is dynamic then you have to use ARG command in dockerfile,so that you can pass argument while building docker image without changing dockerfile

ref : https://docs.docker.com/engine/reference/builder/#arg

Sign up to request clarification or add additional context in comments.

2 Comments

"--verbose" is an argument of klokantech/tileserver-gl. I think the image start implicit a script and use the arguments. But >>ARG "--verbose"<< not work. Server start but not verbose!
Ok, as your using the pre-built image of tileserver which expoes options filed explicitly. So u need to use option during docker run . Ref : tileserver.readthedocs.io/en/latest/installation.html
0

In case of "klokantech/tileserver-gl --verbose" the argument is used by an implicit startscript on boot of the image. This argument is not in Dockerfile.

docker build -t "test:myimage" . docker run test:myimage --verbose 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.