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

Adding the possibility to run as an arbitrary user #14

Merged
merged 3 commits into from
Nov 1, 2023

Conversation

danakim
Copy link
Collaborator

@danakim danakim commented Oct 30, 2023

No description provided.

@danakim danakim requested a review from quartje October 30, 2023 15:18
@quartje quartje force-pushed the run-apache2-arbitrary-user branch from 11932f9 to f85e5a6 Compare October 30, 2023 15:43
@quartje
Copy link
Contributor

quartje commented Oct 30, 2023

It's not working as expected yet. I am adding the following as environment variable:
APACHE_RUN_USER: #1021
And the error is:
chown: invalid spec: '1021':

@danakim
Copy link
Collaborator Author

danakim commented Oct 31, 2023

@quartje - there was an error in my logic when chowing. Fixed in the last commit. Can you please pull, rebuild and try again?

@quartje
Copy link
Contributor

quartje commented Nov 1, 2023

It works. However, restarting a container fails:

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message
[Wed Nov 01 09:15:39.728399 2023] [mpm_event:notice] [pid 21:tid 140245984449664] AH00489: Apache/2.4.38 (Debian) configured -- resuming normal operations
[Wed Nov 01 09:15:39.728450 2023] [core:notice] [pid 21:tid 140245984449664] AH00094: Command line: 'apache2 -D FOREGROUND'
useradd: user 'openconext' already exists

@danakim
Copy link
Collaborator Author

danakim commented Nov 1, 2023

@quartje - added a fix to take care of this, only add the user if it does not exist. Please pull and retest.

Copy link
Contributor

@quartje quartje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works!
Lets merge :)

@quartje quartje merged commit 5f26d0d into main Nov 1, 2023
1 check passed
@quartje quartje deleted the run-apache2-arbitrary-user branch November 1, 2023 20:20
@danakim
Copy link
Collaborator Author

danakim commented Nov 2, 2023

Awesome! Thanks @quartje

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants