GrahamDumpleton / mod_wsgi-docker

Docker images for Apache/mod_wsgi.
Apache License 2.0
72 stars 36 forks source link

Error while building on Windows 10 #17

Closed piontkowski closed 7 years ago

piontkowski commented 7 years ago

I tried building a Django app but got an error, so I tried building the example Django app and got the same error. I'm running Docker for Windows 10.

C:\dev\wsgi-docker\demos\django-1.7>docker -v
Docker version 1.13.1, build 092cba3

C:\dev\wsgi-docker\demos\django-1.7>docker build -t my-python-app .
Sending build context to Docker daemon 579.1 kB
Step 1/2 : FROM grahamdumpleton/mod-wsgi-docker:python-2.7-onbuild
python-2.7-onbuild: Pulling from grahamdumpleton/mod-wsgi-docker
357ea8c3d80b: Pulling fs layer
d8e8125c3c45: Pulling fs layer
8ce0f800159c: Pull complete
51666a419414: Pull complete
045c2d41cdcf: Pull complete
da0c5bb9768e: Pull complete
7a683736e1c6: Pull complete
9021919b127d: Pull complete
2d0ee1f8e3b7: Pull complete
28e556b37a65: Pull complete
c52e0d09645b: Pull complete
799dabb4f6ba: Pull complete
Digest: sha256:9f47437c7ebfc7374e61bc7396bb6c56ed25187bd5560d35305bf568e222f995
Status: Downloaded newer image for grahamdumpleton/mod-wsgi-docker:python-2.7-onbuild
# Executing 2 build triggers...
Step 1/1 : COPY . /app
Step 1/1 : RUN mod_wsgi-docker-build
 ---> Running in 9566e093cbb9
 -----> Installing dependencies with pip
Collecting Django<1.8 (from -r requirements.txt (line 1))
  Downloading Django-1.7.11-py2.py3-none-any.whl (7.4MB)
Installing collected packages: Django
Successfully installed Django-1.7.11
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
 -----> Running .whiskey/action_hooks/build
: No such file or directory
The command '/bin/sh -c mod_wsgi-docker-build' returned a non-zero code: 127
GrahamDumpleton commented 7 years ago

At a guess you are missing the #! line in the build script, or are attempting to run some other command in the script which doesn't exist. What is in the build script?

piontkowski commented 7 years ago

I had originally tried building my own app, but after that failed I tried just running on the demo you provided. C:\dev\wsgi-docker is my clone of this repo. I'm in the demos/django-1.7 directory.

GrahamDumpleton commented 7 years ago

Try changing the first line of the build script from:

#!/usr/bin/env bash

to:

#!/bin/bash

Not sure why am using the first way.

piontkowski commented 7 years ago

That works!

GrahamDumpleton commented 7 years ago

Changed in repo to /bin/sh.