【问题标题】:Nextcloud docker image rebrandingNextcloud 码头工人形象更名
【发布时间】:2021-08-27 14:36:07
【问题描述】:

我想使用来自 dockerhub 的 nextcloud 图像作为基础图像,以创建一个新的子图像,其中包含我自己公司的徽标代替 nextcloud 和我喜欢的背景颜色。任何人都可以帮助我完成这个过程或任何链接到这个解决方案? https://nextcloud.com/changelog

-download this zip 

-make a docker file

-your should install apache and setup it

-change logo and colour theme in your css file

-built a new image

【问题讨论】:

    标签: docker dockerfile dockerhub nextcloud


    【解决方案1】:

    一般的做法是这样的:

    1. 在本地运行官方镜像,按照Docker Hub的说明开始。
    2. 使用 docker 和 shell 命令修改应用程序。你可以:
      • 在正在运行的容器中打开一个 shell (docker exec -it <container> sh) 并使用控制台命令编辑文件;
      • 从容器中复制文件并使用docker cp返回;
      • docker run 命令中使用-v <src>:<dest> 将本地文件挂载到容器中。
    3. 完成编辑后,您需要重复 Dockerfile 中的所有步骤:
    # use the version you used to start the local container
    FROM nextcloud
    
    # write commands that you used inside the container (if any)
    RUN echo hello!
    
    # Push edited files that you copied/mounted inside
    COPY local.file /to/some/place/inside/the/image
    
    # More possible commands in Dockerfile Reference
    # https://docs.docker.com/engine/reference/builder/
    

    之后,您可以使用docker build 创建修改后的图像。

    【讨论】:

    • 使用 docker cp 从容器中复制文件并返回;我正在尝试使用 docker cp 命令将图像文件从本地计算机复制到正在运行的 nextcloud docker 容器。但是当我尝试使用 shell 定位容器内的文件时,我无法使用 ls 找到它,即使 find 命令显示它存在于容器内。我需要在容器中使用此图像文件来更改 css 文件中的徽标。我该如何解决这个问题?
    猜你喜欢
    • 2021-07-08
    • 2017-02-01
    • 2016-01-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-24
    相关资源
    最近更新 更多