# How use ${DRONE\_COMMIT\_MESSAGE} in plugins/docker

**URL:** <https://drone.discourse.group/t/how-use-drone-commit-message-in-plugins-docker/9706>\
**Category:** Drone Support\
**Created:** [November 28, 2019, 2:58pm UTC](https://drone.discourse.group/t/how-use-drone-commit-message-in-plugins-docker/9706 "2019-11-28T14:58:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![riav](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/riav/32/5846_2.png) [@riav](https://drone.discourse.group/u/riav)\
**Post date:** [November 28, 2019, 2:58pm UTC](https://drone.discourse.group/t/how-use-drone-commit-message-in-plugins-docker/9706/1 "2019-11-28T14:58:17Z")

</div>

Hi.  
I’d like to use the commit message to construct my image name using plugins/docker.  
But the ${DRONE\_COMMIT\_MESSAGE} variable comes with formatting that prevents image building.

My commit is:  
git commit -am base/alpine

.drone.yml:  
image: plugins/docker  
settings:  
username: kevinbacon  
password: pa55word  
repo: registry-local/${DRONE\_COMMIT\_MESSAGE}  
registry: registry-local

The ${DRONE\_COMMIT\_MESSAGE} variable is displayed “base/alpine\n”

Generating the following error

/usr/local/bin/docker tag a1300ac3117bc90f8bc82d0db527573a88dd163b registry-local/“base/alpine\n”:3.10  
Error parsing reference: “registry-local/“base/alpine\n”:3.10” is not a valid repository/tag: invalid reference format

I try  
repo: registry-local/${DRONE\_COMMIT\_MESSAGE/\n/}]  
it´s works, but not enough.  
Missed remove quotes.  
registry-local/“base/alpine”:3.10

Does anyone have any idea how to modify this variable before it is used?
