How can I manage composer files?

未关闭
#225 1 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
docker, docker-compose
领域
devops

调研方向

首先跟踪在使用主机 bind mount 时,Drupal 镜像当前如何处理 /opt/drupal/composer.json 和 composer.lock;该 issue 未指定任何仓库文件或测试。完成标准是:只有在主机挂载的对应文件不存在时,容器才复制每个文件,并且所示的 docker-compose volume 配置能够正常工作。

由索引模型根据 Issue 内容生成。

描述

How can I manage composer.json and composer.lock files that hosting under /opt/drupal that I can't use volume mount these files without creating exact one in host machine (or at least I don't know).

Logic: copy composer.(json|lock) from container /opt/drupal/composer.(json|lock) if not in the host machine.

After that volume binding will work.

drupal:
  image: drupal:9.4
  volumes:
    - ../src/composer.json:/opt/drupal/composer.json
    - ../src/composer.lock:/opt/drupal/composer.lock 

WHY: To be able to easily organize files with git. Not only

  - ../src/modules:/var/www/html/modules
  - ../src/profiles:/var/www/html/profiles
  - ../src/themes:/var/www/html/themes
  - ../src/sites:/var/www/html/sites

are important. Also, composer files are needed.

主要语言
Shell
星标
292
派生
199
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

docker-library/drupal 的其他 Issue

查看 docker-library/drupal 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。