ansible / galaxy

Legacy Galaxy still available as read-only on https://old-galaxy.ansible.com - looking for the new galaxy -> https://github.com/ansible/galaxy_ng
Apache License 2.0
854 stars 328 forks source link

make dev/up throws error #1966

Open zoomonthis opened 5 years ago

zoomonthis commented 5 years ago

Bug Report

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

SUMMARY

putting a './' here solves the issue. ( ./${PWD}:/galaxy:z ) ) in filename ./scripts/docker/dev/compose.yml

STEPS TO REPRODUCE
EXPECTED RESULTS

shouldnt throw any error in any docker version.

ACTUAL RESULTS

returns error.

zoomonthis commented 5 years ago

actually there should be an error if $PWD is not defined. as this is referring to that env variable. putting ./ is not a permanent solution as it would fail in later stages.

ironfroggy commented 5 years ago

It is pretty abnormal for $PWD not to be set. What shell are you using and do you have any idea why such a standard variable would be missing from your environment?

If this does need a fix, I think a more proper change would be to replace it with $(pwd)

romanblanco commented 5 years ago

I also ran into the issue trying to setup galaxy locally:

• ~/devel/galaxy/ devel sudo make dev/up
[sudo] password for rblanco:
docker-compose -p galaxy -f ./scripts/docker/dev/compose.yml up
WARNING: The PWD variable is not set. Defaulting to a blank string.
Starting galaxy_postgres_1 ... done
Starting galaxy_redis_1    ... done
Starting galaxy_influxdb_1 ... done
Starting galaxy_rabbitmq_1 ... done
Recreating 136c4f283fa8_galaxy_galaxy_1 ... error

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

ERROR: for galaxy  Cannot create container for service galaxy: create .: volume name is too short, names should be at least two alphanumeric characters
ERROR: Encountered errors while bringing up the project.
make: *** [Makefile:234: dev/up] Error 1

using absolute path worked for me:

diff --git a/scripts/docker/dev/compose.yml b/scripts/docker/dev/compose.yml
index e6d052a6..2e3dd1ac 100644
--- a/scripts/docker/dev/compose.yml
+++ b/scripts/docker/dev/compose.yml
@@ -4,7 +4,7 @@ services:
   galaxy:
     image: galaxy-dev:latest
     volumes:
-      - ${PWD}:/galaxy:z
+      - /home/rblanco/devel/galaxy:/galaxy:z
     ports:
       - '8000:8000'
     depends_on:

I'm using GNU bash, version 5.0.11(1)-release (x86_64-pc-linux-gnu) on Archlinux, in my dotfiles I'm not setting PWD variable

Echoing the variable gives me the path:

• ~/devel/galaxy/ devel echo $(pwd)
/home/rblanco/devel/galaxy
• ~/devel/galaxy/ devel echo $PWD
/home/rblanco/devel/galaxy

If this does need a fix, I think a more proper change would be to replace it with $(pwd)

@ironfroggy using $(pwd) to fix the script does not work for me