arjunurs
arjunurs

Reputation: 1182

Cannot create container from docker-compose due to short volume name

When I run docker-compose up with this docker-compose.yml.

version: '3'

services:
    rundeck:
        build:
            context: ./
            args:
                RUNDECK_IMAGE: ${RUNDECK_IMAGE:-rundeck/rundeck:SNAPSHOT}
        links:
          - mysql
        tty: true
        environment:
            RUNDECK_GRAILS_URL: http://localhost
            RUNDECK_SERVER_FORWARDED: 'true'
            RUNDECK_DATABASE_DRIVER: com.mysql.jdbc.Driver
            RUNDECK_DATABASE_USERNAME: rundeck
            RUNDECK_DATABASE_PASSWORD: rundeck
            RUNDECK_DATABASE_URL: jdbc:mysql://mysql/rundeck?autoReconnect=true&useSSL=false
            RUNDECK_PLUGIN_EXECUTIONFILESTORAGE_NAME: com.rundeck.rundeckpro.amazon-s3
            RUNDECK_PLUGIN_EXECUTIONFILESTORAGE_S3_BUCKET: ${RUNDECK_PLUGIN_EXECUTIONFILESTORAGE_S3_BUCKET}
            RUNDECK_PLUGIN_EXECUTIONFILESTORAGE_S3_REGION: ${RUNDECK_PLUGIN_EXECUTIONFILESTORAGE_S3_REGION}
            RUNDECK_STORAGE_CONVERTER_1_CONFIG_PASSWORD: ${RUNDECK_STORAGE_PASSWORD}
            RUNDECK_CONFIG_STORAGE_CONVERTER_1_CONFIG_PASSWORD: ${RUNDECK_STORAGE_PASSWORD}
        volumes:
          - data:/home/rundeck/server/data
          - ${AWS_CREDENTIALS}:/home/rundeck/.aws/credentials
          - ${RUNDECK_LICENSE_FILE:-/dev/null}:/home/rundeck/etc/rundeckpro-license.key
    nginx:
        image: nginx
        links:
          - rundeck
        volumes:
          - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
        ports:
          - 80:80
    mysql:
        image: mysql:5.7
        expose:
          - 3306
        environment:
          - MYSQL_ROOT_PASSWORD=root
          - MYSQL_DATABASE=rundeck
          - MYSQL_USER=rundeck
          - MYSQL_PASSWORD=rundeck
        volumes:
          - dbdata:/var/lib/mysql

volumes:
    data:
    dbdata:

I get the following error:

xxxx_mysql_1 is up-to-date
Creating xxxx_rundeck_1 ... error

ERROR: for xxxx_rundeck_1  Cannot create container for service rundeck: create .: volume name is too short, names should be at least two alphanumeric characters

ERROR: for rundeck  Cannot create container for service rundeck: create .: volume name is too short, names should be at least two alphanumeric characters
ERROR: Encountered errors while bringing up the project.

I don't see a create . statement anywhere in the docker-compose.yml or the Dockerfile.

What am I missing?

Upvotes: 2

Views: 8193

Answers (2)

jrouquie
jrouquie

Reputation: 4405

I once got this issue when the .env file contained

AWS_CREDENTIALS:foo

instead of

AWS_CREDENTIALS=foo

Upvotes: 0

Jaswinder Singh
Jaswinder Singh

Reputation: 731

You need to update the variable in env file. It is commented and hence adds null value to config. https://github.com/rundeck/docker-zoo/blob/master/cloud/.env.dist#L3

Used in

https://github.com/rundeck/docker-zoo/blob/master/cloud/docker-compose.yml#L27

I got same issue and it resolved once i updated the env variables with value.

Upvotes: 1

Related Questions