Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image from hub doesn't work #26658

Closed
ZHAJOR opened this issue Sep 17, 2016 · 4 comments
Closed

Image from hub doesn't work #26658

ZHAJOR opened this issue Sep 17, 2016 · 4 comments

Comments

@ZHAJOR
Copy link

@ZHAJOR ZHAJOR commented Sep 17, 2016

Description
I made an image for the framework phalcon : https://hub.docker.com/r/zhajor/docker-apache-php7-phalcon/
I tried it on a mac (Docker version 1.12.1, build 6f9534c, experimental) with kitematic and it was working well.
So i decided to deploy it on my debian server (configuration below). I pulled the image and then did a basic docker-compose:

        image: zhajor/docker-apache-php7-phalcon
        networks:
            in:
                aliases:
                    - api
        ports:
            - "6868:80"
        container_name: compose-phalcon-api
        volumes:
            - ./tutorial:/var/www/html

Everything is running, the container can interpret a phpinfo() but when it comes to phalcon i have no answer from the web server. The project i used was the same as the one under mac os :
https://github.com/phalcon/tutorial
As it was working fine on mac os, i decided to build the image manually on the server and it's working like a charm.
I really don't know where is the problem.
Steps to reproduce the issue:

  1. docker pull zhajor/docker-apache-php7-phalcon
  2. git clone https://github.com/phalcon/tutorial.git
  3. Just run a container with zhajor/docker-apache-php7-phalcon and a shared directory as ./tutorial:/var/www/html
  4. Now if you try to access the index.php it just doesn't work but if you add a php file (tutorial/public/ninja.php) with a phpinfo() the page is loading and tells that phalcon is loaded.

If you do it manually so:

  1. git clone https://github.com/ZHAJOR/Docker-apache-php7-phalcon.git && build -t phalcon .
  2. git clone https://github.com/phalcon/tutorial.git
  3. Just run a container with phalcon and a shared directory as ./tutorial:/var/www/html
  4. Now it's working and i get the "Hello" message

Output of docker version:
Client:
Version: 1.12.1
API version: 1.24
Go version: go1.6.3
Git commit: 23cf638
Built: Thu Aug 18 05:02:53 2016
OS/Arch: linux/amd64

Server:
Version: 1.12.1
API version: 1.24
Go version: go1.6.3
Git commit: 23cf638
Built: Thu Aug 18 05:02:53 2016
OS/Arch: linux/amd64

Output of docker info:

Containers: 11
Running: 6
Paused: 0
Stopped: 5
Images: 103
Server Version: 1.12.1
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 180
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge null host overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options:
Kernel Version: 3.16.0-4-amd64
Operating System: Debian GNU/Linux 8 (jessie)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 3.854 GiB
Name: 83050hd56109
ID: WBDN:XLGV:CFM4:YZZA:5IBF:3G2N:O32W:D6PG:THKR:XYFZ:XFT3:ITXZ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No kernel memory limit support
WARNING: No oom kill disable support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
Insecure Registries:
127.0.0.0/8

Additional environment details (AWS, VirtualBox, physical, etc.):
debian jessie

@ZHAJOR ZHAJOR changed the title Images from hub doesn't work Image from hub doesn't work Sep 17, 2016
@cpuguy83

This comment has been minimized.

Copy link
Contributor

@cpuguy83 cpuguy83 commented Sep 17, 2016

Sounds likely to be a permissions issue.
Docker4Mac has a slightly different behavior when mapping in host directories in that it maps the UID/GID to match the process in the container, but on Linux there is no such mapping.

@cpuguy83

This comment has been minimized.

Copy link
Contributor

@cpuguy83 cpuguy83 commented Sep 17, 2016

Going to close this for now, but if you find that it's not the case please ping here.

@cpuguy83 cpuguy83 closed this Sep 17, 2016
@ZHAJOR

This comment has been minimized.

Copy link
Author

@ZHAJOR ZHAJOR commented Sep 17, 2016

I don't think it's a permission issue, i already tried a chmod -R 777 on the project directory, i can add a basic file like ninja.php in the public directory and it's working well.
I also did a chown, but nothing came from this.

In fact i did a line by line test and the problem come from the index.php: $application->handle()->getContent();
So when it's loading the application.

And as i told if i make a build -t phalcon ./Dockerfile and then run with the same docker-compose.yml file (just changed the image name) everything is working under the debian jessie server without any chmod or chown.

Any other ideas or things to try ?

@ZHAJOR

This comment has been minimized.

Copy link
Author

@ZHAJOR ZHAJOR commented Sep 18, 2016

Hum some news, it's working under ubuntu.
I am looking on my debian server what is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.