rehabstudio / dockerfiles

Dockerfiles for automated building of public images on Docker Hub
4 stars 4 forks source link

djangae wont run on docker #9

Open crowne opened 8 years ago

crowne commented 8 years ago

After inheriting from the rehabstudio/djangae Dockerfile and running the image, I get the following error:


$ docker run --rm -p 8000:8000 -p 8001:8001 -p 8002:8002 crowne/test-dae-rs Traceback (most recent call last): File "manage.py", line 13, in execute_from_command_line(sys.argv) File "/src/sitepackages/djangae/core/management/init.py", line 65, in execute_from_command_line return _execute_from_command_line(namespace.sandbox, ['manage.py'] + namespace.args, overrides) File "/src/sitepackages/djangae/core/management/init.py", line 42, in _execute_from_command_line sandbox_overrides File "/usr/lib/python2.7/contextlib.py", line 17, in enter return self.gen.next() File "/src/sitepackages/djangae/sandbox.py", line 337, in activate configuration = application_configuration.ApplicationConfiguration(options.config_paths) File "/opt/google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 831, in init module_configuration = ModuleConfiguration(config_path, app_id) File "/opt/google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 152, in init 'When there is a Dockerfile in the current directory, the only ' google.appengine.tools.devappserver2.errors.DockerfileError: When there is a Dockerfile in the current directory, the only supported runtime is runtime: custom. Please switch to runtime: custom. The devappserver does not actually use your Dockerfile, so please use either the --runtime flag to specify the runtime you want or use the --custom_entrypoint flag to describe how to start your application.


Stealthii commented 8 years ago

This is a 'feature' of newer appengine SDK versions which add support for Docker (by detecting the Dockerfile). We should have an ONBUILD method which solves this. In the meantime, in your child Dockerfile, use RUN rm /src/Dockerfile to have devappserver return to it's original behaviour.