Skip to content
This repository was archived by the owner on Mar 21, 2022. It is now read-only.
This repository was archived by the owner on Mar 21, 2022. It is now read-only.

Special characters in filenames are not escaped #247

@nudgegoonies

Description

@nudgegoonies

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions