当我尝试从ftp保存zip文件时,该文件从未保存到Docker文件系统中。我可以在本地运行以下代码,并且文件被保存而没有问题。当我在Docker容器中运行以下代码时,该文件永远不会写入存储文件夹。
$loc = storage_path('app/rovi/');
$remote_file = $directory . $m->remoteFileName . $yesterday . '_Full.zip';
// get zip file
$zip_file = Storage::disk('ftp')->get($remote_file);
$this->info($zip_file);
$this->info('Download file received...');
Storage::disk('local')->put( $m->fileNameZip . '.zip', $zip_file);
Docker文件
FROM nielsvdoorn/docker-alpine-laravel:latest
RUN apk update
RUN pecl install mongodb \
&& docker-php-ext-enable mongodb
RUN apk add zlib-dev \
&& docker-php-ext-configure zip --with-zlib-dir=/usr \
&& docker-php-ext-install zip
RUN apk add --no-cache $PHPIZE_DEPS \
&& pecl install xdebug-2.6.0 \
&& docker-php-ext-enable xdebug
RUN apk add curl-dev
RUN apk add libxml2-dev
RUN printf "xdebug.remote_autostart=1\n" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN printf "xdebug.remote_enable=1\n" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN printf "xdebug.remote_handler=dbgp\n" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN printf "xdebug.remote_mode=req\n" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN printf "xdebug.remote_host=92.168.1.118\n" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN printf "xdebug.remote_port=9000\n" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN printf "xdebug.remote_connect_back=1\n" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN printf "memory_limit=512M" >> /usr/local/etc/php/php.ini
# for confirmation
RUN cat /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
RUN php -i | grep xdebug.remote
COPY ./usr /usr
COPY . /var/www/html
RUN apk add --update bash && rm -rf /var/cache/apk/*
COPY ./rancher/supervisord.conf /etc/supervisord.conf
RUN chown -R root:root /var/www/html/storage
RUN chmod 777 -R /var/www/html/storage
该文件永远不会随Storage :: disk一起保存,我已将所有者更改为root,并将权限更改为777以进行测试。仍然没有运气。 laravel日志中没有错误