[artpy@fedora GeekTech]$ docker-compose up
[+] Running 4/4
✔ Network geektech_default Created 0.0s
✔ Container geektech-adminer-1 Created 0.0s
✔ Container geektech-db-1 Created 0.0s
✔ Container geektech-wp-1 Created 0.0s
Attaching to geektech-adminer-1, geektech-db-1, geektech-wp-1
geektech-db-1 | 2023-09-21 09:15:19+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.5.20+maria~ubu2004 started.
geektech-adminer-1 | WordPress not found in /var/www/html - copying now...
geektech-wp-1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.89.2.13. Set the 'ServerName' directive globally to suppress this message
geektech-wp-1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.89.2.13. Set the 'ServerName' directive globally to suppress this message
geektech-wp-1 | [Thu Sep 21 09:15:19.264902 2023] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.56 (Debian) PHP/8.2.6 configured -- resuming normal operations
geektech-wp-1 | [Thu Sep 21 09:15:19.264925 2023] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
geektech-db-1 | 2023-09-21 09:15:19+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
geektech-db-1 | 2023-09-21 09:15:19+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.5.20+maria~ubu2004 started.
geektech-adminer-1 | Complete! WordPress has been successfully copied to /var/www/html
geektech-adminer-1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.89.2.11. Set the 'ServerName' directive globally to suppress this message
geektech-adminer-1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 10.89.2.11. Set the 'ServerName' directive globally to suppress this message
geektech-adminer-1 | [Thu Sep 21 09:15:19.378429 2023] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.56 (Debian) PHP/8.2.6 configured -- resuming normal operations
geektech-adminer-1 | [Thu Sep 21 09:15:19.378454 2023] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
geektech-db-1 | 2023-09-21 09:15:19+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] Starting MariaDB 10.5.20-MariaDB-1:10.5.20+maria~ubu2004 source revision b735ca47738a1d2e995a429f40afd620eb7d8843 as process 1
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] InnoDB: Uses event mutexes
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] InnoDB: Number of pools: 1
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] InnoDB: Using Linux native AIO
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] InnoDB: Completed initialization of buffer pool
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=45115,45115
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] InnoDB: 128 rollback segments are active.
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] InnoDB: Creating shared tablespace for temporary tables
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] InnoDB: 10.5.20 started; log sequence number 45127; transaction id 20
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] Plugin 'FEEDBACK' is disabled.
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] InnoDB: Buffer pool(s) load completed at 230921 9:15:19
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] Server socket created on IP: '::'.
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] Reading of all Master_info entries succeeded
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] Added new Master_info '' to hash table
geektech-db-1 | 2023-09-21 9:15:19 0 [Note] mysqld: ready for connections.
geektech-db-1 | Version: '10.5.20-MariaDB-1:10.5.20+maria~ubu2004' socket: '/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
我有一个WordPress项目,我使用Docker Compose在Podman容器上运行,在过去的一周里,我遇到了Podman和Docker Compose无法启动的问题。我不得不尝试各种解决方案,包括卸载和重新安装Podman和Docker Compose。最终,我通过将Docker Compose的版本降级到以前的版本来解决这个问题。现在,问题是我没有备份我的项目,我执行了一个提交,然后删除并重新安装了Podman卷中的WordPress设置。目前,我的项目无法访问,当我启动Docker Compose时,它试图从头开始重新安装WordPress,导致项目为空。
如何恢复我的项目?
1条答案
按热度按时间cetgtptt1#
你没有像医生说的那样从四维Angular 思考!
首先,请提供您的
docker-compose.yml
代码,这样我们就可以更好地了解您的容器化环境是如何部署的。我看到你有三个集装箱...
我的第一个问题是什么是
adminer-1
容器,这是Podman吗?好的,这是一个迷你Docker组成101(这可能是你的问题)
1.在包含
docker-compose.yml
配置的目录中运行docker-compose up
,最初将下载/拉取并缓存yml
容器中定义的所有图像。1.因此,每次运行
docker-compose up
时,都会基于容器块中使用的映像构建容器和卷。1.如果您开始处理您的环境,一般安装和本地数据输入到您的运行容器中,这些数据都存储在运行容器中。
1.如果在
docker-compose.yml
目录下运行docker-compose stop
,这将关闭运行环境,Docker Desktop中当前缓存的此容器组的任何数据仍将存在。然后,您可以运行docker-compose up
命令,所有输入的数据仍然与上次使用docker-compose stop
时一样。1.但是,如果您在项目目录中使用
docker-compose down
命令,这将关闭docker-compose.yml
中所有正在运行的容器,然后完全删除Docker Desktop App中所有容器缓存的数据。所以下次你使用docker-compose up
时...您将再次回到起点(所有数据丢失)。1.要从Docker部署的容器中保留数据,您需要持久化数据。您需要将卷数据从容器映像Map到包含
docker-compose.yml
文件的项目目录。请参阅以下yml卷持久Map配置的示例.容器中的持久卷
因此,在容器块中的
docker-compose.yml
中,添加卷配置以将当前图像数据Map到合成文件的目录。请参阅下面的例子为WordPress的图像在撰写文件.请参阅我的repo on github,了解Docker Compose与WordPress的用法,这可能有助于将持久数据和其他集成到
docker-compose.yml
文件中。