我正在从此(https://github.com/ulsmith/alpine-apache-php7创建一个膝上图像,在我的应用程序中,我有一个2.5 GB的图像文件夹,该图像已成功构建,但是当我尝试将其推送到Google容器注册表时,它没有由于尺寸过大,有时服务器超时,因此无法正常工作,至少需要20分钟。 15分钟或更长时间之后,在此之前,我收到图像错误,而Google Cloud SDK则什么也没有显示。
这是我正在使用的命令:gcloud builds submit --tag us.gcr.io/[project-id]/test:v1
我检查了crcmod并启用了它。
这是我的Dockerfile:+
FROM alpine:edge
MAINTAINER Paul Smith <pa.ulsmith.net>
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk update && apk upgrade && apk add \
bash apache2 php7-apache2 curl ca-certificates openssl openssh git php7 php7-phar php7-json php7-iconv php7-openssl tzdata openntpd nano
RUN curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
RUN apk add \
php7-ftp \
php7-xdebug \
php7-mcrypt \
php7-mbstring \
php7-soap \
php7-gmp \
php7-pdo_odbc \
php7-dom \
php7-pdo \
php7-zip \
php7-mysqli \
php7-sqlite3 \
php7-pdo_pgsql \
php7-bcmath \
php7-gd \
php7-odbc \
php7-pdo_mysql \
php7-pdo_sqlite \
php7-gettext \
php7-xml \
php7-xmlreader \
php7-xmlwriter \
php7-tokenizer \
php7-xmlrpc \
php7-bz2 \
php7-pdo_dblib \
php7-curl \
php7-ctype \
php7-session \
php7-redis \
php7-exif \
php7-intl \
php7-fileinfo \
php7-ldap \
php7-apcu
RUN apk add php7-simplexml
RUN cp /usr/bin/php7 /usr/bin/php \
&& rm -f /var/cache/apk/*
RUN sed -i "s/#LoadModule\ rewrite_module/LoadModule\ rewrite_module/" /etc/apache2/httpd.conf \
&& sed -i "s/#LoadModule\ session_module/LoadModule\ session_module/" /etc/apache2/httpd.conf \
&& sed -i "s/#LoadModule\ session_cookie_module/LoadModule\ session_cookie_module/" /etc/apache2/httpd.conf \
&& sed -i "s/#LoadModule\ session_crypto_module/LoadModule\ session_crypto_module/" /etc/apache2/httpd.conf \
&& sed -i "s/#LoadModule\ deflate_module/LoadModule\ deflate_module/" /etc/apache2/httpd.conf \
&& sed -i "s#^DocumentRoot \".*#DocumentRoot \"/app/public\"#g" /etc/apache2/httpd.conf \
&& sed -i "s#/var/www/localhost/htdocs#/app/public#" /etc/apache2/httpd.conf \
&& printf "\n<Directory \"/app/public\">\n\tAllowOverride All\n</Directory>\n" >> /etc/apache2/httpd.conf
ENV PHP_ALLOW_URL_INCLUDE=On
RUN mkdir /app && mkdir /app/public && chown -R apache:apache /app && chmod -R 755 /app && mkdir bootstrap
COPY app/ /app/public/
ADD start.sh /bootstrap/
RUN chmod +x /bootstrap/start.sh
EXPOSE 80
ENTRYPOINT ["/bootstrap/start.sh"]
是否有更好的方法来推送大图像?