docker-compose-error-AUTH_SOCK

Hello friends, I have a problem when running docker-compose up -d, I get an error when generating the command.

The SSH_AUTH_SOCK variable is not set. Defaulting to a blank string
WARNING: The POSTGRES_PASSWORD variable is not set. Defaulting to a blank string.

Recreating consul_database_1 … done
Creating consul_app_1 … error

-----------------------------------------------------------------------my docker compose------------------

version: “3”
services:

service configuration for our database

database:

# use the preferred version of the official Postgres image
# see https://hub.docker.com/_/postgres/
image: postgres:9.6.21
environment:
  - POSTGRES_PASSWORD=$POSTGRES_PASSWORD
# persist the database between containers by storing it in a volume
volumes:
  - docker-example-postgres:/var/lib/postgresql/data

service configuration for our dockerized Rails app

app:

# use the Dockerfile next to this file
build: .
entrypoint: /usr/local/bin/entrypoint.sh
command: bundle exec rails s -p 3000 -b "0.0.0.0"
working_dir: /var/www/consul

# rely on the RAILS_ENV value of the host machine
# environment:
#RAILS_ENV: $RAILS_ENV

# makes the app container aware of the DB container
depends_on:
  - database

# expose the port we configured Unicorn to bind to
ports:
  - "3000:3000"
# map our application source code, in full, to the application root of our container
volumes:
  - .:/var/www/consul:delegated
  - bundle:/usr/local/bundle:delegated
  - "$SSH_AUTH_SOCK:/tmp/agent.sock"
environment:
  - POSTGRES_PASSWORD=$POSTGRES_PASSWORD
  - SSH_AUTH_SOCK=/tmp/agent.sock

volumes:
docker-example-postgres: {}
bundle: {}


por favor alguien que me ayude??

Hi, @alejosk8 :smile:.

Try removing the $SSH_AUTH_SOCK part in the volumes section. It seems not to work properly on some systems :thinking:.

Hope that helps!

P.S. If you’ve got further comments regarding this issue, it would be great if you could add them to the GitHub issue about docker-compose.

I’m going to try it friend I’ll tell you how it went thank you very much for your answer I thought nobody could support me.

Greetings