
wappo/wordpressThis is a clone of the official wordpress apache-image with a few modifications. First of all the VOLUME declaration is removed from the image, it's better to leave that decision to the site maintainer what to expose as volumes. All entry points are removed, we rely on you to do that or to leave it to the base image to start apache. Also all WP files are placed in /var/www/html by default. Core files are part of the app/image and we don't want an entrypoint to copy the files.
All these modifications are more or less related to the removal of the VOLUME declaration.
WP-core files (the app) is not owned by www-data by default anymore. There's instead two arguments ("user" and "uid") where you can change this at build time. This is done to deny WP from changing itself which is a major security thing with WP overall. Yes, that also implies that you can't install plugins from the gui anymore, but if you want to do that, use the official image. Install whatever plugins you like in your own Dockerfile.
WP-CLI is bundled with the image. It doesn't affect image size that much and makes it way easier to run tasks on a site without additional images and duplications of DB configs in composer.yaml files etc.
FROM wappo/wordpress:5 WORKDIR /var/www/html COPY --chown=wordpress:wordpress ./wp-content/mu-plugins wp-content/mu-plugins/ COPY --chown=wordpress:wordpress ./wp-content/languages wp-content/languages/ COPY --chown=wordpress:wordpress ./wp-content/plugins wp-content/plugins/ COPY --chown=wordpress:wordpress ./wp-content/themes wp-content/themes/
version: "3" services: wordpress-www: image: company/wordpress:latest labels: - "traefik.enable=true" - "traefik.http.routers.wordpress-www.entrypoints=web" - "traefik.http.routers.wordpress-www.rule=Host(`wp-test.local`)" - "traefik.http.services.wordpress-www.loadbalancer.server.port=80" - "traefik.docker.network=web" environment: WORDPRESS_DB_HOST: mariadb WORDPRESS_DB_USER: www WORDPRESS_DB_PASSWORD: "" WORDPRESS_DB_NAME: wordpress_db_name WORDPRESS_AUTH_KEY: "" WORDPRESS_SECURE_AUTH_KEY: "" WORDPRESS_LOGGED_IN_KEY: "" WORDPRESS_NONCE_KEY: "" WORDPRESS_AUTH_SALT: "" WORDPRESS_SECURE_AUTH_SALT: "" WORDPRESS_LOGGED_IN_SALT: "" WORDPRESS_NONCE_SALT: "" WORDPRESS_CONFIG_EXTRA: "define( 'WP_AUTO_UPDATE_CORE', false);define('DISALLOW_FILE_EDIT', true);define('DISALLOW_FILE_MODS',true);define( 'WP_POST_REVISIONS', 5);define('DISABLE_WP_CRON', true);" networks: - bridge volumes: - wordpress_uploads:/var/www/html/wp-content/uploads networks: bridge: name: 'bridge' volumes: wordpress_uploads: name: 'wordpress_uploads'
FPM needs a webserver to ship static content and since WP mixes static and dynamic content inside the app you really need to expose the entire app in a VOLUME for that to work. Use the official image instead. Yes, one could copy the app into two containers (fpm and nginx) but that's too much hassle for the small performance gain we're talking about. And, it doesn't feel right in the tummy to do it like that either.


探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务