# Docker-compose error

**URL:** <https://forums.docker.com/t/docker-compose-error/80398>\
**Category:** General\
**Created:** [August 28, 2019, 3:39pm UTC](https://forums.docker.com/t/docker-compose-error/80398 "2019-08-28T15:39:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![frank3427](https://avatars.discourse-cdn.com/v4/letter/f/8e7dd6/32.png) [@frank3427](https://forums.docker.com/u/frank3427)\
**Post date:** [August 28, 2019, 3:39pm UTC](https://forums.docker.com/t/docker-compose-error/80398/1 "2019-08-28T15:39:06Z")

</div>

I am trying to convert the run command to a compose file but I keep running into errors

```
version: '3'
services:
smtprelay:
image: denispaiva/relay-o365
container_name: smtprelay
environment:
- HOSTNAME=smtprelay.xxx.local
- SMTP_LOGIN: [noreply@xxx.com](mailto:noreply@xxx.com)
- SMTP_PASSWORD: 2gZ1^l$8O5!^mw
- EXT_RELAY_HOST: smtp.office365.com
- EXT_RELAY_PORT: 587
- ACCEPTED_NETWORKS: 172.16.0.0/12 10.0.0.0/8
ports:
- '25:25'
restart: always

```

ERROR: Invalid interpolation format for “environment” option in service “smtprelay”: “2gZ1^l$8O5!^mw”

what am I missing to fix the error?

---

<div class="post-metadata">

**Author:** ![meyay](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/meyay/32/34000_2.png) [@meyay](https://forums.docker.com/u/meyay)\
**Post date:** [August 28, 2019, 4:43pm UTC](https://forums.docker.com/t/docker-compose-error/80398/2 "2019-08-28T16:43:51Z")

</div>

Can you please wrap you in a preformatted text block?  
Escape your smtp\_password.
