Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

没有swoole环境时候是否可以入队列操作? #39

Open
mredencom opened this issue Oct 31, 2020 · 7 comments
Open

没有swoole环境时候是否可以入队列操作? #39

mredencom opened this issue Oct 31, 2020 · 7 comments

Comments

@mredencom
Copy link

如题

@Littlesqx
Copy link
Owner

可以;实例化(然后序列化)的代码不会运行就不会报错,反序列化才执行的环境(消费者)才需要 swoole 环境

@mredencom
Copy link
Author

mredencom commented Nov 2, 2020 via email

@Littlesqx
Copy link
Owner

😂 ,我贴一下给你,紧急需要的话,你可以先试试:

FROM php:7.4.6-cli

COPY ./ /var/www/

RUN \
    php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');" && \
    php composer-setup.php && \
    php -r "unlink('composer-setup.php');" && \
    mv composer.phar /usr/bin/composer && chmod +x "/usr/bin/composer"

RUN \
    apt install apt-transport-https ca-certificates && \
    echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free\n \
    deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free\n \
    deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free\n \
    deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free\n" > /etc/apt/sources.list

RUN \
    apt-get update              && \
    apt-get install -y             \
        libssl-dev                 \
        unzip                      \
        zlib1g-dev                 \
        --no-install-recommends && \
    rm -rf /var/lib/apt/lists/* /usr/bin/qemu-*-static

RUN \
    chmod +x /var/www/scripts/*.sh && \
    /var/www/scripts/install-swoole.sh 4.5.2

RUN composer install --no-dev

ENTRYPOINT ["./vendor/bin/aint-queue"]

WORKDIR "/var/www/"

@mredencom
Copy link
Author

mredencom commented Nov 2, 2020 via email

@mredencom
Copy link
Author

我这边包安装成功了,Installing littlesqx/aint-queue (v1.2.2): Extracting archive 但是总是报错我的目录不存在 docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"./vendor/bin/aint-queue\": stat ./vendor/bin/aint-queue: no such file or directory": unknown.

@Littlesqx
Copy link
Owner

试了下,可以成功,你这边打包过程应该成功吧

@mredencom
Copy link
Author

试了下,可以成功,你这边打包过程应该成功吧

我这边打包了不下10次可以成功,但是docker run 的时候成功不了。。。。,希望可以给出完整一份教程,感谢!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants