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

Viewed 83

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:

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.

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.

1 Answers

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.

Related