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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run docker image as non-root #795

Merged
merged 2 commits into from Mar 30, 2019
Merged

Conversation

@smueller18
Copy link
Contributor

smueller18 commented Mar 29, 2019

Best practices for docker images is to run containers as non-root user. For example using Kubernetes with the restricted pod security policy, it is not possible to start the current image.
Therefore, the user is changed to node which is the recommended user for node images (see https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md#non-root-user).

After building the docker image and running the example setup with docker-compose, I got the following log messages. I run the setup and created an example page:

wiki_1_f0de2a07b8a9 | 2019-03-29T22:12:13.176Z [MASTER] warn: DB Configuration is empty or incomplete. Switching to Setup mode...
wiki_1_f0de2a07b8a9 | 2019-03-29T22:12:13.176Z [MASTER] info: Starting setup wizard...
wiki_1_f0de2a07b8a9 | 2019-03-29T22:12:13.771Z [MASTER] info: HTTP Server on port: [ 3000 ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:12:13.771Z [MASTER] info: HTTP Server on port: [ 3000 ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:12:13.792Z [MASTER] info: HTTP Server: [ RUNNING ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:12:13.792Z [MASTER] info: 馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾馃敾
wiki_1_f0de2a07b8a9 | 2019-03-29T22:12:13.793Z [MASTER] info: 
wiki_1_f0de2a07b8a9 | 2019-03-29T22:12:13.794Z [MASTER] info: Browse to http://localhost:3000/ to complete setup!
wiki_1_f0de2a07b8a9 | 2019-03-29T22:12:13.794Z [MASTER] info: 
wiki_1_f0de2a07b8a9 | 2019-03-29T22:12:13.795Z [MASTER] info: 馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽馃敽
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:41.739Z [MASTER] info: Creating data directories...
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:41.872Z [MASTER] info: Generating certificates...
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:42.295Z [MASTER] info: Persisting config to DB...
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:42.996Z [MASTER] info: Installing default locale...
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:43.060Z [MASTER] info: Creating default groups...
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:43.483Z [MASTER] info: Loaded 17 new authentication strategies: [ OK ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:43.567Z [MASTER] info: Loaded 2 new editors: [ OK ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:43.854Z [MASTER] info: Loaded 12 new loggers: [ OK ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:44.209Z [MASTER] info: Loaded 19 new renderers: [ OK ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:44.444Z [MASTER] info: Loaded 9 new search engines: [ OK ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:44.730Z [MASTER] info: Loaded 10 new storage targets: [ OK ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:44.731Z [MASTER] info: Creating root administrator...
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:46.847Z [MASTER] info: Creating guest account...
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:46.952Z [MASTER] info: Creating default site navigation
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:47.009Z [MASTER] info: Setup is complete!
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:47.015Z [MASTER] info: Stopping Setup...
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:47.025Z [MASTER] info: Setup stopped. Starting Wiki.js...
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:50.377Z [MASTER] warn: Mail is not setup! Please set the configuration in the administration area!
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:50.910Z [MASTER] info: Loading GraphQL Schema...
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:51.871Z [MASTER] info: GraphQL Schema: [ OK ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:52.861Z [MASTER] info: HTTP Server on port: [ 3000 ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:52.892Z [MASTER] info: HTTP Server: [ RUNNING ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:53.210Z [MASTER] info: No new authentication strategies found: [ SKIPPED ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:53.228Z [MASTER] info: No new editors found: [ SKIPPED ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:53.371Z [MASTER] info: No new loggers found: [ SKIPPED ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:53.617Z [MASTER] info: No new renderers found: [ SKIPPED ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:53.724Z [MASTER] info: No new search engines found: [ SKIPPED ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:53.852Z [MASTER] info: No new storage targets found: [ SKIPPED ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:53.864Z [MASTER] info: Authentication Strategy local: [ OK ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:53.910Z [MASTER] info: Purging orphaned upload files...
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:53.924Z [MASTER] info: Syncing locales with Graph endpoint...
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:53.927Z [MASTER] info: Fetching latest updates from Graph endpoint...
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:53.941Z [MASTER] info: Purging orphaned upload files: [ COMPLETED ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:54.659Z [MASTER] info: Fetching latest updates from Graph endpoint: [ COMPLETED ]
wiki_1_f0de2a07b8a9 | 2019-03-29T22:13:55.405Z [MASTER] info: Syncing locales with Graph endpoint: [ COMPLETED ]
wiki_1_f0de2a07b8a9 | Loading configuration from /wiki/config.yml... OK
wiki_1_f0de2a07b8a9 | 2019-03-29T22:17:33.774Z [JOB] info: Rendering page ID 1...
wiki_1_f0de2a07b8a9 | 2019-03-29T22:17:38.552Z [JOB] info: Rendering page ID 1: [ COMPLETED ]
smueller18 added 2 commits Mar 29, 2019
@auto-assign auto-assign bot requested a review from NGPixel Mar 29, 2019
@NGPixel NGPixel merged commit 16d88a7 into Requarks:master Mar 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can鈥檛 perform that action at this time.