shyim / shopware-docker

Easy to use Docker Installation for Shopware 5 and Shopware 6
MIT License
115 stars 27 forks source link

realpath: command not found #90

Closed mtuchi closed 3 years ago

mtuchi commented 3 years ago

Describe the bug Cannot start containers am getting an error saying that realpath: command not found and other errors

To Reproduce Steps to reproduce the behavior:

  1. Clone the shopware-docker
  2. Smylink swdc to /usr/local/bin/swdc 3.Run swdc to test
  3. Run swdc up

Expected behavior A clear and concise description of what you expected to happen.

Screenshots

➜  shopware-docker git:(master) ./swdc up
./swdc: line 13: realpath: command not found
ls: /Users/mtuchi/Code: No such file or directory
./functions.sh: line 78: VHOST_${folder^^}_HOSTS: bad substitution
./functions.sh: line 121: VHOST_${folder^^}_CERT_NAME: bad substitution
./functions.sh: line 55: VHOST_${folder^^}_IMAGE: bad substitution
ERROR: The Compose file '/tmp/swdc-docker-compose.yml' is invalid because:
services.app_.image contains an invalid type, it should be a string
services.app_.extra_hosts contains an invalid type, it should be an object, or an array
ERROR: The Compose file '/tmp/swdc-docker-compose.yml' is invalid because:
services.app_.image contains an invalid type, it should be a string
services.app_.extra_hosts contains an invalid type, it should be an object, or an array

Environment:

shyim commented 3 years ago

You need to install realpath on mac. brew install realpath

mtuchi commented 3 years ago

You need to install realpath on mac. brew install realpath

What about in production, Am using AWS ec2 instance with ubuntu image, do i need to install realpath as well ?

mtuchi commented 3 years ago

You need to install realpath on mac. brew install realpath

brew install realpath was not working for me, So i used this quick fix

#!/bin/bash

realpath() {
    [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
}

realpath "$0"

I got it from stackoverflow https://stackoverflow.com/questions/3572030/bash-script-absolute-path-with-os-x

It seems to work fine but am not sure if it's a good idea

shyim commented 3 years ago

Ahh it was brew install coreutils

Btw I didn't really tested it on mac

mtuchi commented 3 years ago

coreutils

Ooh okay noted, It seems like most problem are solved after install coreutils. but am still getting

/Users/mtuchi/Playground/shopware-docker/functions.sh: line 78: VHOST_${folder^^}_HOSTS: bad substitution
/Users/mtuchi/Playground/shopware-docker/functions.sh: line 121: VHOST_${folder^^}_CERT_NAME: bad substitution
/Users/mtuchi/Playground/shopware-docker/functions.sh: line 55: VHOST_${folder^^}_IMAGE: bad substitution
ERROR: The Compose file '/tmp/swdc-docker-compose.yml' is invalid because:
services.app_.image contains an invalid type, it should be a string
services.app_.extra_hosts contains an invalid type, it should be an object, or an array
ERROR: The Compose file '/tmp/swdc-docker-compose.yml' is invalid because:
services.app_.image contains an invalid type, it should be a string
services.app_.extra_hosts contains an invalid type, it should be an object, or an array
shyim commented 3 years ago

Maybe old version of bash? brew install bash?