zephir Docker image not working

Hi, I'm trying to use Docker images in two different ways:

  1. by pulling from docker hub link
  2. and building from github Dockerfile link for versions 7 and 5.6 without success.

In first attempt, after executing $ docker run -it --rm phalconphp/zephir version image is downloaded corectly but execution is not returning anything. Same with $ docker run -it --rm phalconphp/zephir help. After $ docker run -it --rm phalconphp/zephir version execution, container list/info returs:

CONTAINER ID        IMAGE                      COMMAND                CREATED             STATUS                      PORTS               NAMES
84c388039d5a        phalconphp/zephir:latest   "/docker-entrypoint.   51 seconds ago      Exited (1) 50 seconds ago                       evil_hawking 

Please notice exit status code.

In second scenario I'v cloned whole repo link, then cd ./zephir/7/, and try to build image. Image build returned:

Sending build context to Docker daemon 6.656 kB
Sending build context to Docker daemon 
Step 0 : FROM phalconphp/php:7
7: Pulling from phalconphp/php
7f6464a0010b: Pull complete 
be40636a920c: Pull complete 
4c3c2b5c8e0d: Pull complete 
a3656ed09878: Pull complete 
54d490c808ae: Pull complete 
16fe0e95c96c: Pull complete 
8b5a87e5e2d2: Pull complete 
8c4bc8e3d229: Pull complete 
f1fb5ae84e9e: Pull complete 
6b996efd3060: Pull complete 
f240f6e0a95e: Pull complete 
deb1c65fcc00: Pull complete 
156423bcaa5a: Pull complete 
aa301c353d5c: Pull complete 
be30a7ea38a3: Pull complete 
94f12baf6bfd: Pull complete 
a16f6804bd85: Already exists 
e094bcb9d0fe: Already exists 
0a7a3b768106: Already exists 
46e772baf32a: Already exists 
1804336e7ca7: Already exists 
560f958a917a: Already exists 
ec33295a0e55: Already exists 
e089b7d75a55: Already exists 
3e16a58ced32: Already exists 
e53e5b68cb24: Already exists 
160a4000f8a5: Already exists 
8532d2290d3d: Already exists 
5a6be97f70f2: Already exists 
3f31d55028b7: Already exists 
ea17bb428704: Already exists 
50978d3840be: Already exists 
a052c8cb6e7e: Already exists 
84667cd7d4df: Already exists 
b83e13982a63: Already exists 
Digest: sha256:fa9443df25dbe38dbcd5828b37521fb65841f3ef6adc25ade07a1b71dbc07656
Status: Downloaded newer image for phalconphp/php:7
 ---> 94f12baf6bfd
Step 1 : LABEL maintainer "Serghei Iakovlev <[email protected]>"
 ---> Running in 05b1dd393432
 ---> b406bc998f00
Removing intermediate container 05b1dd393432
Step 2 : ENV ZEPHIRDIR /usr/share/zephir PATH $PATH:/usr/share/zephir/bin
 ---> Running in 3a8a82741842
 ---> 28c868061295
Removing intermediate container 3a8a82741842
Step 3 : COPY docker-entrypoint.sh /docker-entrypoint.sh
 ---> 50a3eaaab6dc
Removing intermediate container 620f239ff941
Step 4 : RUN mkdir -p /usr/share/zephir &&     git clone --depth=1 -v https://github.com/phalcon/zephir /tmp/zephir &&     cd /tmp/zephir &&     echo "#!/usr/bin/env bash\nexec \"\[email protected]\"" | tee /usr/bin/sudo &&      chmod +x /usr/bin/sudo &&     (cd parser && phpize --clean) &&     ./install -c &&     chmod +x /docker-entrypoint.sh &&     rm -f /etc/php/7.0/cli/conf.d/20-redis.ini &&     apt-get autoremove &&     apt-get autoclean &&     apt-get clean &&     rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 ---> Running in d8bebea75cae
Cloning into '/tmp/zephir'...
POST git-upload-pack (217 bytes)
POST git-upload-pack (226 bytes)
#!/usr/bin/env bash
exec "[email protected]"
/bin/sh: 1: cd: can't cd to parser
INFO[0038] The command [/bin/sh -c mkdir -p /usr/share/zephir &&     git clone --depth=1 -v https://github.com/phalcon/zephir /tmp/zephir &&     cd /tmp/zephir &&     echo "#!/usr/bin/env bash\nexec \"\[email protected]\"" | tee /usr/bin/sudo &&      chmod +x /usr/bin/sudo &&     (cd parser && phpize --clean) &&     ./install -c &&     chmod +x /docker-entrypoint.sh &&     rm -f /etc/php/7.0/cli/conf.d/20-redis.ini &&     apt-get autoremove &&     apt-get autoclean &&     apt-get clean &&     rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*] returned a non-zero code: 2 

same with 5.6 version:

Sending build context to Docker daemon 297.5 kB
Sending build context to Docker daemon 
Step 0 : FROM phalconphp/php:5.6
5.6: Pulling from phalconphp/php
a16f6804bd85: Pull complete 
e094bcb9d0fe: Pull complete 
0a7a3b768106: Pull complete 
46e772baf32a: Pull complete 
1804336e7ca7: Pull complete 
560f958a917a: Pull complete 
ec33295a0e55: Pull complete 
e089b7d75a55: Pull complete 
3e16a58ced32: Pull complete 
e53e5b68cb24: Pull complete 
160a4000f8a5: Pull complete 
8532d2290d3d: Pull complete 
5a6be97f70f2: Pull complete 
3f31d55028b7: Pull complete 
ea17bb428704: Pull complete 
50978d3840be: Pull complete 
a052c8cb6e7e: Pull complete 
84667cd7d4df: Pull complete 
b83e13982a63: Pull complete 
bfe6b97086b6: Pull complete 
7f50a55d4f2e: Pull complete 
529d8395ca46: Pull complete 
3028d0926fa8: Pull complete 
44b6c4fcf3f6: Pull complete 
1b5ed0a2cbbd: Pull complete 
f4530911542b: Pull complete 
c7b97eab4fd0: Pull complete 
6ce919bc33ab: Pull complete 
90b22ddad140: Pull complete 
b79587d9ddca: Pull complete 
3b430f80a2c9: Pull complete 
583c34411a6d: Pull complete 
639582510447: Pull complete 
4adfd3acf9b8: Pull complete 
e967d028e2df: Pull complete 
268d12aa511c: Pull complete 
835ea86e26c0: Pull complete 
Digest: sha256:eda0b26df29d52358ba09d83bd528b7f260bc049d793b3f4d3ed6b3013f011fd
Status: Downloaded newer image for phalconphp/php:5.6
 ---> 835ea86e26c0
Step 1 : LABEL maintainer "Serghei Iakovlev <[email protected]>"
 ---> Running in 67afb4939c60
 ---> 1212fc9d73cf
Removing intermediate container 67afb4939c60
Step 2 : ENV ZEPHIRDIR /usr/share/zephir PATH $PATH:/usr/share/zephir/bin ZEND_DONT_UNLOAD_MODULES 1
 ---> Running in b60c3634761a
 ---> c72533200d4b
Removing intermediate container b60c3634761a
Step 3 : RUN mkdir -p /usr/share/zephir     && git clone --depth=1 -v git://github.com/phalcon/zephir /usr/share/zephir     && cd /usr/share/zephir     && (cd parser && phpize --clean)     && echo "#!/usr/bin/env bash\nexec \"\[email protected]\"" | tee /usr/bin/sudo     && chmod +x /usr/bin/sudo     && ./install -c     && rm -f /etc/php/5.6/cli/conf.d/20-redis.ini     && git clone --depth=1 -v git://github.com/phalcon/php-zephir-parser.git /tmp/parser     && cd /tmp/parser     && ./install     && echo extension=zephir_parser.so | tee /etc/php/5.6/cli/conf.d/20-zephir_parser.ini     && php --ri "Zephir Parser"     && zephir help     && apt-get autoremove     && apt-get autoclean     && apt-get clean     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 ---> Running in 7526c7d6f5bb
Cloning into '/usr/share/zephir'...
/bin/sh: 1: cd: can't cd to parser
INFO[0073] The command [/bin/sh -c mkdir -p /usr/share/zephir     && git clone --depth=1 -v git://github.com/phalcon/zephir /usr/share/zephir     && cd /usr/share/zephir     && (cd parser && phpize --clean)     && echo "#!/usr/bin/env bash\nexec \"\[email protected]\"" | tee /usr/bin/sudo     && chmod +x /usr/bin/sudo     && ./install -c     && rm -f /etc/php/5.6/cli/conf.d/20-redis.ini     && git clone --depth=1 -v git://github.com/phalcon/php-zephir-parser.git /tmp/parser     && cd /tmp/parser     && ./install     && echo extension=zephir_parser.so | tee /etc/php/5.6/cli/conf.d/20-zephir_parser.ini     && php --ri "Zephir Parser"     && zephir help     && apt-get autoremove     && apt-get autoclean     && apt-get clean     && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*] returned a non-zero code: 2 

Please, can anyone help me?

Thanks in advance, ByteFather

A lot of of the Docker images located in the phalconphp/dockerfiles repository are educational and/or experimental. In addition, these Docker images need a maintainer as well as constant updating. We would like to leave in this repository only those Docker images that we need to build DEBs and RPMs: https://github.com/phalcon/dockerfiles/tree/master/build I recommend you to create your own Docker images that meets your needs. Please feel free to ask any questions regarding creating own Docker images.