简体   繁体   English

权限被拒绝:Github 操作上的共享卷写入和读取失败

[英]Permission denied: Shared volume write and Read failing on Github Actions

I am trying to first create a file in one container and read that file from the other container.我试图首先在一个容器中创建一个文件,然后从另一个容器中读取该文件。 The docker-compose.yml looks like below: docker-compose.yml 如下所示:

web-api:
    ...
    volumes:
      ...
      - ./cap:/opt/cap/src/cap
cap-client:
    ...
    volumes:
      - ./cap:/opt/cap/src/cap

I am able to do the write and read operation on my machine but I am getting the permission denied error when trying to write a file in /opt/cap/src/cap/token.env .我可以在我的机器上执行写入和读取操作,但是尝试在/opt/cap/src/cap/token.env中写入文件时出现权限被拒绝错误。

What I am missing here?我在这里缺少什么?

I am suspecting either I am not doing the shared volume config correctly or it is related to user permissions.我怀疑我没有正确执行共享卷配置,或者它与用户权限有关。

In the pipeline I geuss you want to use something like artifacts instead.在管道中,我猜你想使用类似工件的东西。 Personally I never run docker-compose up -d in the pipeline but make use of GitHub services instead.就我个人而言,我从未在管道中运行docker-compose up -d而是使用 GitHub 服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM