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

php镜像自动拉取一直报错 #560

Closed
Fluox-Etine opened this issue Jul 19, 2023 · 2 comments
Closed

php镜像自动拉取一直报错 #560

Fluox-Etine opened this issue Jul 19, 2023 · 2 comments

Comments

@Fluox-Etine
Copy link

这次docker-compose.yam。
`version: "3"
services:
nginx:
build:
context: ./services/nginx
args:
NGINX_VERSION: nginx:${NGINX_VERSION}
CONTAINER_PACKAGE_URL: ${CONTAINER_PACKAGE_URL}
NGINX_INSTALL_APPS: ${NGINX_INSTALL_APPS}
container_name: nginx
ports:
- "${NGINX_HTTP_HOST_PORT}:80"
- "${NGINX_HTTPS_HOST_PORT}:443"
volumes:
- ${SOURCE_DIR}:/www/:rw
- ${NGINX_SSL_CERTIFICATE_DIR}:/ssl:rw
- ${NGINX_CONFD_DIR}:/etc/nginx/conf.d/:rw
- ${NGINX_CONF_FILE}:/etc/nginx/nginx.conf:ro
- ${NGINX_FASTCGI_PHP_CONF}:/etc/nginx/fastcgi-php.conf:ro
- ${NGINX_FASTCGI_PARAMS}:/etc/nginx/fastcgi_params:ro
- ${NGINX_LOG_DIR}:/var/log/nginx/:rw
environment:
TZ: "$TZ"
restart: always
networks:
- default
# 可以把-default 改成下列配置,以固定容器IP
#default:
# ipv4_address: 10.0.0.10

php:
build:
context: ./services/php80
args:
PHP_VERSION: php:${PHP80_VERSION}-fpm-alpine3.13
CONTAINER_PACKAGE_URL: ${CONTAINER_PACKAGE_URL}
PHP_EXTENSIONS: ${PHP80_EXTENSIONS}
TZ: "$TZ"
container_name: php80
expose:
- 9501
volumes:
- ${SOURCE_DIR}:/www/:rw
- ${PHP80_PHP_CONF_FILE}:/usr/local/etc/php/php.ini:ro
- ${PHP80_FPM_CONF_FILE}:/usr/local/etc/php-fpm.d/www.conf:rw
- ${PHP80_LOG_DIR}:/var/log/php
- ${DATA_DIR}/composer:/tmp/composer
restart: always
cap_add:
- SYS_PTRACE
networks:
- default

mysql5:
image: mysql/mysql-server:${MYSQL5_VERSION}
container_name: mysql5
ports:
- "${MYSQL5_HOST_PORT}:3306"
volumes:
- ${MYSQL5_CONF_FILE}:/etc/mysql/conf.d/mysql.cnf:ro
- ${DATA_DIR}/mysql5:/var/lib/mysql/:rw
- ${MYSQL5_LOG_DIR}:/var/log/mysql/:rw
restart: always
networks:
- default
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL5_ROOT_PASSWORD}"
MYSQL_ROOT_HOST: "${MYSQL5_ROOT_HOST}"
TZ: "$TZ"

networks:
default:
driver: bridge
ipam:
driver: default
# 解除下面的注释可以设置网段,用于nginx等容器固定容器IP
#config:
# - subnet: 10.0.0.0/24
`

错误提示
`docker-compose up
/usr/lib/python3/dist-packages/paramiko/transport.py:236: CryptographyDeprecationWarning: Blowfish has been deprecated
"class": algorithms.Blowfish,
Building php
[+] Building 31.9s (3/3) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.25kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> ERROR [internal] load metadata for docker.io/library/php:8.0.13-fpm-alpine3.13 31.9s

[internal] load metadata for docker.io/library/php:8.0.13-fpm-alpine3.13:


Dockerfile:2

1 | ARG PHP_VERSION
2 | >>> FROM ${PHP_VERSION}
3 |
4 | ARG TZ

ERROR: failed to solve: php:8.0.13-fpm-alpine3.13: failed commit on ref "manifest-sha256:bd3af255a5ee22022b3b2d98fe0f7732416305f2cec8303278382560bcdf3745": "manifest-sha256:bd3af255a5ee22022b3b2d98fe0f7732416305f2cec8303278382560bcdf3745" failed size validation: 9442 != 2411: failed precondition
ERROR: Service 'php' failed to build : Build failed
`

@youxia0617
Copy link

docker pull php:8.0.13-fpm-alpine3.13 手动拉取一下

@yeszao yeszao closed this as completed Oct 19, 2023
@i-cooltea
Copy link

这个问题是什么原因导致的 ?

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

No branches or pull requests

4 participants