文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

使用docker安装部署NextCloud私人网盘的方法步骤

2024-04-02 19:55

关注

1、查询并下载NextCloud镜像

执行命令

docker search nextcloud
docker pull nextcloud

演示操作

# 查询nextcloud镜像
[root@docker ~]# docker search nextcloud
NAME                             DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
nextcloud                        A safe home for all your data                   3113      [OK]
linuxserver/nextcloud            A Nextcloud container, brought to you by Lin…   480
nextcloud/all-in-one                                                             25
crazymax/nextcloud               Nextcloud image based on Alpine Linux           9
nextcloudci/server               Nextcloud server straight from GitHub master    2                    [OK]
nextcloudci/php7.2               Docker container to execute PHP 7.2 unit tes…   1                    [OK]
nextcloud/univention-app-image                                                   1
nextcloudci/php7.3               Docker container to execute PHP 7.3 unit tes…   1                    [OK]
nextcloudci/translations-app     The docker image to run our translation sync…   0                    [OK]
nextcloud/aio-talk                                                               0
nextcloud/aio-nextcloud                                                          0
nextcloud/aio-postgresql                                                         0
nextcloud/aio-apache                                                             0
nextcloud/aio-collabora                                                          0
nextcloudcookbook/testci         A repository to contain the test routines fo…   0
nextcloud/aio-redis                                                              0
nextcloudci/php7.4               Docker container for php7.4 unit tests          0
nextcloud/aio-clamav                                                             0
treehouses/nextcloud-tags                                                        0
treehouses/nextcloud                                                             0
nextcloudci/php7.1               Docker container to execute PHP 7.1 unit tes…   0                    [OK]
nextcloudci/android              Android test container                          0                    [OK]
nextcloudci/php7.0               Docker container to execute PHP 7.0 unit tes…   0                    [OK]
nextcloud/aio-onlyoffice                                                         0
nextcloudci/php8.0                                                               0

# 拉取nextcloud镜像
[root@docker ~]# docker pull nextcloud
Using default tag: latest
latest: Pulling from library/nextcloud
a2abf6c4d29d: Pull complete
c5608244554d: Pull complete
2d07066487a0: Pull complete
1b6dfaf1958c: Pull complete
32c5e6a60073: Pull complete
90cf855b27cc: Pull complete
8b0f1068c586: Pull complete
53530861540e: Pull complete
b088256e8218: Pull complete
29c48e642f3d: Pull complete
bebfd59a832e: Pull complete
3c07d6be5322: Pull complete
52a174ca2213: Pull complete
2db451f4f766: Pull complete
462c9168620c: Pull complete
5f6a7ae88b1d: Pull complete
8507904d39d6: Pull complete
f6dc5bb9d193: Pull complete
d57202c49578: Pull complete
57f778f1c66e: Pull complete
Digest: sha256:bd3406506335b6621b1eb7a3d897654ac7963e3db4b91cbea3436f159655d0ba
Status: Downloaded newer image for nextcloud:latest
docker.io/library/nextcloud:latest

# 查询nextcloud镜像是否下载完成
[root@docker ~]# docker images | grep nextcloud
nextcloud       latest         c805c152803c   4 months ago   969MB


# 查看nextcloud镜像详细信息
[root@docker ~]# docker inspect c805c152803c
[
    {
        "Id": "sha256:c805c152803cd2efd9556755b99e97122bf51aeb5a2c3e0470a7098d205c2c0e",
        "RepoTags": [
            "nextcloud:latest"
        ],
        "RepoDigests": [
            "nextcloud@sha256:bd3406506335b6621b1eb7a3d897654ac7963e3db4b91cbea3436f159655d0ba"
        ],
        "Parent": "",
        "Comment": "",
        "Created": "2021-12-22T12:11:13.660964245Z",
        "Container": "821b536dedc6cac092fa9abeaf773d541d4067faaf2980c8c8c5d77d08d195c0",
        "ContainerConfig": {
            "Hostname": "821b536dedc6",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "80/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "PHPIZE_DEPS=autoconf \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkg-config \t\tre2c",
                "PHP_INI_DIR=/usr/local/etc/php",
                "APACHE_CONFDIR=/etc/apache2",
                "APACHE_ENVVARS=/etc/apache2/envvars",
                "PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
                "PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64",
                "PHP_LDFLAGS=-Wl,-O1 -pie",
                "GPG_KEYS=1729F83938DA44E27BA0F4D3DBDB397470D12172 BFDDD28642824F8118EF77909B67A5C12229118F",
                "PHP_VERSION=8.0.14",
                "PHP_URL=https://www.php.net/distributions/php-8.0.14.tar.xz",
                "PHP_ASC_URL=https://www.php.net/distributions/php-8.0.14.tar.xz.asc",
                "PHP_SHA256=fbde8247ac200e4de73449d9fefc8b495d323b5be9c10cdb645fb431c91156e3",
                "PHP_MEMORY_LIMIT=512M",
                "PHP_UPLOAD_LIMIT=512M",
                "NEXTCLOUD_VERSION=23.0.0"
            ],
******省略内容******

2、创建并启动NextCloud容器

执行命令

docker run -d --restart=always --name nextcloud -p 5757:80 nextcloud:latest

# 参数解释:
# docker run:启动容器
# -d:后台启动
# --restart=always:docker重启该容器跟着重启
# --nmae nextcloud:自定义容器名称
# -p 5757:80:将服务器的5757端口映射到容器的80端口
# nextcloud:latest:选择启动的镜像和版本

docker ps

docker inspect 57a357e60bec

演示操作

[root@docker ~]# docker run -d --restart=always --name nextcloud -p 5757:80 nextcloud:latest
57a357e60bec1e31cd493c2f5fff8988906b2d76c3769394b592d94df589f0cd

[root@docker ~]# docker ps
CONTAINER ID   IMAGE              COMMAND                  CREATED         STATUS         PORTS                                   NAMES
57a357e60bec   nextcloud:latest   "/entrypoint.sh apac…"   5 minutes ago   Up 5 minutes   0.0.0.0:5757->80/tcp, :::5757->80/tcp   nextcloud

[root@docker ~]# docker inspect 57a357e60bec
[
    {
        "Id": "57a357e60bec1e31cd493c2f5fff8988906b2d76c3769394b592d94df589f0cd",
        "Created": "2022-05-16T04:39:06.762224758Z",
        "Path": "/entrypoint.sh",
        "Args": [
            "apache2-foreground"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 1865,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2022-05-16T04:39:07.677422059Z",
            "FinishedAt": "0001-01-01T00:00:00Z"
        }
******省略内容******

访问http://IP:5757

本例访问http://192.168.200.66:5757

3、访问NextCloudWEB界面

设置管理员用户名与密码。

等待安装应用完成。

初始化完成。

4、参考链接

Nextcloud - Official Image | Docker Hub

到此这篇关于使用docker安装部署NextCloud私人网盘的方法步骤的文章就介绍到这了,更多相关docker安装部署NextCloud内容请搜索编程网以前的文章或继续浏览下面的相关文章希望大家以后多多支持编程网!

阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     801人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     348人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     311人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     432人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     220人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-服务器
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯