Skip to content
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

Correct some problems with the docker-compose #111

Merged
merged 4 commits into from Oct 10, 2019

Conversation

@slallemand
Copy link
Collaborator

slallemand commented Oct 9, 2019

Now, a simple docker-compose up starts everything (even a demo UI).

For development, the docker-compose-build.yml can be used

Updated the doc as well

slallemand added 4 commits Oct 9, 2019
Now, a simple docker-compose up starts everything (even a demo UI).

For development, the docker-compose-build.yml can be used

Updated the doc as well
@peter-vandenabeele-axa

This comment has been minimized.

Copy link

peter-vandenabeele-axa commented on 7d0da56 Oct 9, 2019

How sure are we that user id 1001 will remain the correct user id. Maybe we can use the alphabetic name of the user? Not sure ...

This comment has been minimized.

Copy link
Collaborator Author

slallemand replied Oct 9, 2019

no :)
I have build this image the same way Redhat does it for their own image and we do not need a "real" user.

In pure Docker, 1001 will be used ; in Openshift it will be a random UID that is used

This comment has been minimized.

Copy link
Collaborator

BinaryBrain replied Oct 9, 2019

So if it's a random UID in Openshift, your chown will fail, right?

This comment has been minimized.

Copy link
Collaborator Author

slallemand replied Oct 9, 2019

quick answer : no

long answer : the chown you are seeing here is ONLY for a CI step (drone) and so this step is not done in Openshift
If you need to build it in Openshift, you will used one of the Dockerfile.

Also, just to clarify the way Openshift is working : at build step, you will use UID=1001 with GID=0 while at runtime step you will use a RANDOM UID and GID=0

This comment has been minimized.

Copy link

peter-vandenabeele-axa replied Oct 9, 2019

Trying to understand... Does this command actually work because of:

  • the User ID uid 1001 (and the user ID 1001 would have to be present on the host to be helpful)
  • or because of the group ID gid 0 (which is the root group, which I presume will always be present).

PS. I just read https://medium.com/@mccode/understanding-how-uid-and-gid-work-in-docker-containers-c37a01d01cf and that helped understanding it a bit better ...

This comment has been minimized.

Copy link
Collaborator Author

slallemand replied Oct 9, 2019

This work because in the image registry.access.redhat.com/ubi8/nodejs-10 made by redhat is using UID 1001 at runtime.
But please do not mix all the topics : this chown is only used in CI and NOT in Openshift

This comment has been minimized.

Copy link

peter-vandenabeele-axa replied Oct 9, 2019

Thanks for all the explanations :-)

Copy link
Collaborator

aarohijohal left a comment

A breath of fresh air!
The entire process is much faster; thanks @slallemand
The only problem I see is that the parsr-ui does not log the address:port information to the console; so we have no idea that it is running.

@aarohijohal aarohijohal merged commit 1801d98 into develop Oct 10, 2019
1 check passed
1 check passed
continuous-integration/drone/pr Build is passing
Details
@aarohijohal aarohijohal deleted the feature/docker-improvements branch Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.