Hervé Martinet
Hervé Martinet

Reputation: 1

Which application user on custom docker image on Jelastic?

I deploy my applications from GitLab. I generate docker images in a private GitLab repository and I use jeastic-cli to redeploy them from GitLab CI.

I create my images from the python:3.7-slim-bullseye image.

In the DockerFile I create a user and a group to run my application and I set the user before calling my entrypoint:

USER myapp:myapp

The applications work very well but I have problems with sharing volumes:

  1. When I mount a volume from another node I have to chown the folder after mounting the volume so that the application has access to it.

  2. When I mount a volume from the application node on the load balancer for example (to publicly expose certain files by HTTP without going through the application), this sometimes crashes the redeployment (the mount failed) and I have to redo the redeployment (sometimes 2 or 3 times).

I contacted the support of my Jelastic provider. It advises me not to create/specify a user. If I do that the application is executed as root. This seems suspicious and a bit dangerous to me (normally we avoid that the application user can access all files in read+write).

Is there a good way to do this, I can't find anything specific to this in the documentation?

Upvotes: 0

Views: 49

Answers (0)

Related Questions