How can I Enable Unaccent for postgres in Docker-Compose?

I need to enable the accents for postgreSQL. This is my docker-compose.yml, but it doesn’t work. Any tips? Thank you.

  image: postgres
    - 5432
    DB_UNACCENT: true
  image: aboutsource/mailcatcher
    - "1080:1080"
  build: .
  command: passenger start --port 3000
    - .:/myapp
   - RAILS_ENV=development
    - "3000:3000"
    - "25:25"
    - "587:587"
    - db
    - mailcatcher

  • Trouble running UPNP on Docker
  • How can I restart docker service using puppet…?
  • Deploying Docker to AWS Elastic Beanstalk — how to forward port to host? (port binding)
  • Docker container doesn't expose ports when --net=host is mentioned in the docker run command
  • Jenkins Pipeline & Docker Plugin - concurrent builds on unique agents
  • JUJU charm and image based build (qcow2)
  • How to run services on startup in docker container
  • microservice in docker: service registered with private IP
  • How to use redirects in Docker
  • Can't install docker properly
  • Swarm container not getting started with created overlay network
  • CentOS 7 Docker Image and locale compilation
  • One Solution collect form web for “How can I Enable Unaccent for postgres in Docker-Compose?”

    See my previous answer on that topic How to set the locale inside a Docker container?

    Adapt it with the correct locale for your need.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.