Skip to content

user non root user/group in Dockerfile #3756

Open
@MichaelHuys

Description

@MichaelHuys

Describe the bug
Deployment of Docker container from Docker Hub on Kubernetes (OpenShift) gives "Permission denied" during deployment of web application.

To Reproduce
Deploy Docker container on Kubernetes cluster

Expected behavior
A smoothly running container

Screenshots
image

Additional context
Error message in plain text:

oc logs -p opengrok-566f9dd766-snlzc --previous
Running version 1.7.21
synchronization period = 10 minutes
Deploying web application
Traceback (most recent call last):
  File "/scripts/start.py", line 608, in <module>
    main()
  File "/scripts/start.py", line 489, in main
    deploy(logger, url_root)
  File "/scripts/start.py", line 175, in deploy
    deploy_war(logger, os.path.join(OPENGROK_LIB_DIR, "source.war"),
  File "/usr/local/lib/python3.9/dist-packages/opengrok_tools/deploy.py", line 120, in deploy_war
    copyfile(source_war, target_war)
  File "/usr/lib/python3.9/shutil.py", line 264, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: '/usr/local/tomcat/webapps/ROOT.war'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions