-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allure history #69
Comments
@Jen-Persly Can you add more details? what is the command are you running? |
first docker-compose up -d allure Creating history on results directory... |
@Jen-Persly can you share your compose file section? the problem is the directory that you are mounting. |
but if changes to version 2.12.1, it works
|
@Jen-Persly what version appears in the logs when it failed? remove your local latest version and try again without specifying the version. |
@fescobar I think still failed.. I'm using 2.13.2 this is the complete log `ALLURE_VERSION: 2.13.2
|
@Jen-Persly can you tell me what is your current path
|
then I think there is no problem with permission on my machine drwxr-xr-x 3 root root 4096 Mar 18 17:41 . |
@Jen-Persly |
@Jen-Persly Also only the owner of that directory (root) can create files. |
@Jen-Persly Can I close this ticket? |
We are having same problem. We are logged in with root account and getting below message in terminal on centos 7 machine. [root@demo ~]# docker run -p 4040:4040 -p 5050:5050 -e CHECK_RESULTS_EVERY_SECONDS=3 -e KEEP_HISTORY="TRUE" -v ${PWD}/allure-results:/app/allure-results frankescobar/allure-docker-service
We tried with another account using sudo and have same issue. Kindly help. |
@tecinnobiz it’s not a good practice to run docker container with root users. But did you try adding this to your command? References: https://medium.com/redbubble/running-a-docker-container-as-a-non-root-user-7d2e00f8ee15 |
I did the following workaround to fix the problem:- docker exec -u 0 -it 147ffff7ce8e /bin/bash |
@tecinnobiz that is not the right way to handle that. Try the command what I suggested. It’s not an issue. It’s the way that docker works. |
Yes, I am trying the solution proposed by you. |
I understand your point. I tried but got the following error [root@demo allure-docker-java-junit4-example]# docker run -p 4040:4040 -p 5050:5050 -e CHECK_RESULTS_EVERY_SECONDS=3 -e KEEP_HISTORY="TRUE" -v [1]+ Exit 127 docker run -p 4040:4040 -p 5050:5050 -e CHECK_RESULTS_EVERY_SECONDS=3 -e KEEP_HISTORY="TRUE" -v I will try to use docker from a non root user to avoid all this challenges. |
@tecinnobiz not add that part at the end, the last part is for overriding the command to start that container.
Or
For docker-compose: |
As a conclusion, you shouldn't use directories with
If you want to use the same user from the local machine in the container you need to pass |
if you still using the root users. you can try like this @fescobar @tecinnobiz
|
Reference: 10 Docker Image Security Best Practices 2. Least privileged userWhen a To minimize exposure, opt-in to create a dedicated user and a dedicated group in the Docker image for the application; use the A specific user might not exist in the image; create that user using the instructions in the Dockerfile.
The example above:
|
Sorry for answering in the closed issue. But I don't understood one thing. I've changed only one string in my docker-compose:
to
and error "cannot create directory ‘/app/allure-results/history’: Permission denied" has been disappeared. And history became available. |
@KMA71 previous versions used to use root as user. Latest versions not use root user anymore. You should use 2.13.5 the latest one on that wat you can use new features like security and the new UI https://github.com/fescobar/allure-docker-service-ui |
How can i override the user container in Openshift, if i dont have admin privilege to create a service account ? im getting the permission denied error as well |
@mhd-b that is something that you have to check in OpenShift documentation. Docker and Kubernetes support that feature as native. Did you try using user and group |
Yeah i have followed the deployment config and im getting this error : pods "allure-deployment-74fc545d6c-" is forbidden: unable to validate against any security context constraint: [spec.containers[0].securityContext.securityContext.runAsUser: Invalid value: 1000: must be in the ranges: [1001460000, 1001469999] spec.containers[1].securityContext.securityContext.runAsUser: Invalid value: 1000: must be in the ranges: [1001460000, 1001469999]] im unable to setup the container to be ran with Allure userid 1000 as this requires admin access, hope that there is a workaround? Is it possible to change the ownership of the allure folders? |
@mhd-b then Check how to pass your current user (user from the machine where you run the container). |
@mhd-b I got it working by adding fsGroup: 1000 under spec: So the securityContext becomes: spec: i shall raise a pull request to the code example |
@mhd-b if you want to add your example, add it here https://github.com/fescobar/allure-docker-service-examples in |
I was able to fix the permission denied in Openshift by changing the ownership for the directories used by Allure. The changed Dockerfile : FROM frankescobar/allure-docker-service:2.13.6 USER root RUN chown -R allure:root /app USER allure //// Thanks @fescobar :) |
Check in EKS how to override the user |
My friend, you are making me run in circles. I tried reworking your docker img as mhd-b suggested but it still doesnt work. |
@peter-miroshnikov do whatever you want. This project is open source. Many people use this image without any problem. |
docker logs -f allure_allure_1
Creating history on results directory...
mkdir: cannot create directory ‘/app/allure-results/history’: Permission denied
Copying history from previous results...
cp: cannot create directory '/app/allure-results/history': Permission denied
Generating report
The text was updated successfully, but these errors were encountered: