nickjj / build-a-saas-app-with-flask

Learn how to build a production ready web app with Flask and Docker.
https://buildasaasappwithflask.com
MIT License
959 stars 189 forks source link

Illegal instruction: 4 #26

Closed altuzar closed 8 years ago

altuzar commented 9 years ago

Trying to install the project, I get:

# docker-compose up
Illegal instruction: 4

For sure is only that I'm a complete Docker newbie. Probably I didn't "Edit docker-compose.yml and setup a local volume for Postgres/Redis" properly, as I just installed Docker from the Docker site installer for Mac OSX and executed the "Docker Quickstart Terminal" binary.

Ty!

nickjj commented 9 years ago

Hi, can you paste in your entire docker-compose.yml file. Feel free to omit any passwords and secure tokens before pasting it in here.

Also, the new way to install Docker with a Mac would be to use the Docker Toolbox: https://www.docker.com/toolbox

altuzar commented 9 years ago

Hi. My docker-compose.yml file is the same one in the git repo. As I told, complete Docker newbie here. Shame on me hehe. I've used vms a long time but not much Docker. Imagine I have to create a docker volume, install postgresql and redis there and maybe some other deps.

It starts with:

postgres:
  image: postgres:9.4.3
  environment:
    POSTGRES_USER: catwatch
    POSTGRES_PASSWORD: bestpassword
  ports:
    - 5432:5432
  volumes:
    - ~/.docker-volumes/catwatch/postgresql/data:/var/lib/postgresql/data
nickjj commented 9 years ago

Can you try installing Docker using the link in the previous reply? That will also install docker-compose automatically for Macs.

Then report back with the output of:

docker -v
docker-compose -v

Along with what version of OSX you're running.


You shouldn't have to make any of the volumes on your Mac, they will be created automatically. Postgres and Redis will also be running inside of containers.

There are a few Mac dependencies you will need to install, mainly:

brew update 
brew install python node postgresql

Postgresql is only necessary because your Mac needs certain PG related dependencies installed so that the Python PG driver can talk to PG. PG itself will never be running directly.

altuzar commented 9 years ago

Hi. I just installed Docker using that link (DockerToolbox-1.8.1b.pkg) but still not working. I have Mac OSX Yosemite 10.10.4.

The output of those commands are:

# docker -v
Docker version 1.8.1, build d12ea79
# docker-compose -v
Illegal instruction: 4

Thanks for your help!

nickjj commented 9 years ago

Did you run the above brew commands? It seems like there's an issue with docker-compose in general because it's crashing just trying to get the version.

altuzar commented 9 years ago

Before opening this ticket, I googled the error and executed a couple of brew commands but didn't fix the error.

The commands were:

# brew install openssl
Warning: openssl-1.0.2d_1 already installed
# brew link --force openssl
Linking /usr/local/Cellar/openssl/1.0.2d_1... 1548 symlinks created

I also installed fig with pip. Don't know if it's related, but googling the "Illegal instruction: 4" someone recommended it.

pip install fig

Thanks!

nickjj commented 9 years ago

Yes, but did you install the above brew commands I mentioned? You will need them to run the application no matter what.

Also fig is the old docker compose. The project was renamed and abandoned. If you're using fig, you would need to replace all instances of docker-compose with fig. Did it work with fig? You could also try to pip install docker-compose and then you can pip uninstall fig.

nickjj commented 9 years ago

@altuzar, I'm guessing this is fixed for you now in some way or another?