docker-maven-plugin
docker-maven-plugin copied to clipboard
Special characters in filenames are not escaped
Description
I have a Spring Project which produces files with a $ character in the middle of one filename. The $ sign is not escaped in the dockerfile and docker build tries variable substitution and cannot find the file.
How to reproduce
I have this file:
ServletInitializer$ApplicationContextHolder.class
What do you expect
$ character is escaped and file is copied to the image.
What happened instead
The $ character is not escaped in the dockerfile produced by the docker-maven-plugin. Docker cannot find the file because characters after the $ are interpreted as variable. In my case, the variable $ApplicationContextHolder does not exists and docker only looks for ServletInitializer.class
Software:
- docker version: 1.11.2
- docker-maven-plugin version: 0.4.10
- maven version: 3.3.9
Link to documentation where escaping is explained:
https://docs.docker.com/engine/reference/builder/
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Any update on this ?
At least for us this was fixed here: https://github.com/spotify/docker-maven-plugin/pull/248