-
I have this docker file
and this is the docker-compose.yml file
When i start a github action using docker compose i get the following error
If i remove the user option on the docker file and allow it to be built with root as the user the actions works. How can i keep the USER: node and still be able to access the above files |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
nellyk:
Adjust the access rights on the file so the
|
Beta Was this translation helpful? Give feedback.
-
airtower-luna:
Thank you for responding and the suggestions @airtower-luna might you have a suggestion on how i can achieve this
|
Beta Was this translation helpful? Give feedback.
-
In principle:
You can use a similar approach to use group access rights instead (with But: If some other user on the system uses the same UID (or GID in case of group access) they will gain access to the file, which you probably don’t want. Alternatively you could also change the UID of the Also keep in mind that none of these solutions is portable, in case you want to run the same container image on another host. For that it’d be better to use a named volume to store the certificate and key, so you can adjust access rights in the container scope only. |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for the suggestions. I eventually went ahead to use ARG and ENV variables and passing them to the docker image depending on what i was using it for |
Beta Was this translation helpful? Give feedback.
Thank you so much for the suggestions.
I eventually went ahead to use ARG and ENV variables and passing them to the docker image depending on what i was using it for
User root for integrations tests
User node for building the image to be distributed