Docker Image with Update SH Script wget with Wildcards?

Hi,

i have a Problem with an Update Bash Script within the Docker Image.

I have to use Wildcards with wget for a Download Script because the Download URL changes often.

Now i have tested this in the Container itself:

e.g.

wget https://github.com/myadress/app{-,_}test.zip


The Zip File changes sometimes is app-test.zip sometimes app_test.zip

When i execute this manually in Docker exec -it container bash

The above wget command works.

When i implement it into the Docker Image as an Update Bash Script the expansion {} would be escaped and it dont work.

Any Ideas to get this work ?

Please, don’t let people start guessing what your problem is. If you have an implementation that doesn’t work, show that in a Dockerfile for example. Any small detail could be important.

But
 my guess is that the special wildcard is supported by bash and when you run the command in a Dockerfile, you have no bash shell. The default shell is usually “sh”. If the image has bash, you can change it with the SHELL instruction

SHELL ["/bin/bash", "-c"]

Then the next RUN instructions will use the bash shell.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.