I follow the instructions and install all the requisites on a production server,
i try it on locally and run fine but when try to dockerize i got this error about volumen names
I use ruby.2.5.5 image in Docker file to avoid dependecies errors (original Dockerfile uses 2.4.9 image)
Successfully built bb4530a29274
Successfully tagged consul_app:latest
WARNING: Image for service app was built because it did not already exist. To rebuild this image you must use
docker-compose up --build.
Creating consul_app_run … error
ERROR: for consul_app_run Cannot create container for service app: create .: volume name is too short, names should be at least two alphanumeric characters
ERROR: for app Cannot create container for service app: create .: volume name is too short, names should be at least two alphanumeric characters
ERROR: Encountered errors while bringing up the project.
service configuration for our database
# use the preferred version of the official Postgres image # see https://hub.docker.com/_/postgres/ image: postgres:9.4.5 # 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
# 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: - SSH_AUTH_SOCK=/tmp/agent.sock
Any ideas? Thanks